From 4cd9822611b119e213480343ea9ddc62ea85865d Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Tue, 25 Jul 2017 09:38:55 +0900 Subject: [PATCH] Remove warnings in `ColumnDropper.mark_readonly` test. --- spec/components/column_dropper_spec.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/spec/components/column_dropper_spec.rb b/spec/components/column_dropper_spec.rb index 63ed5982da1..a0076f2932c 100644 --- a/spec/components/column_dropper_spec.rb +++ b/spec/components/column_dropper_spec.rb @@ -64,6 +64,8 @@ RSpec.describe ColumnDropper do end after do + ActiveRecord::Base.connection.reset! + ActiveRecord::Base.exec_sql <<~SQL DROP TABLE IF EXISTS #{table_name}; DROP TRIGGER IF EXISTS #{table_name}_email_readonly ON #{table_name}; @@ -81,8 +83,6 @@ RSpec.describe ColumnDropper do PG::RaiseException, /Discourse: email in #{table_name} is readonly/ ) - - ActiveRecord::Base.exec_sql("ROLLBACK") end it 'should allow updates to the other columns' do @@ -107,8 +107,6 @@ RSpec.describe ColumnDropper do PG::RaiseException, /Discourse: email in table_with_readonly_column is readonly/ ) - - ActiveRecord::Base.exec_sql("ROLLBACK") end it 'should allow insertions to the other columns' do