mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
Remove warnings in ColumnDropper.mark_readonly
test.
This commit is contained in:
parent
be3c9bca0b
commit
4cd9822611
1 changed files with 2 additions and 4 deletions
|
@ -64,6 +64,8 @@ RSpec.describe ColumnDropper do
|
||||||
end
|
end
|
||||||
|
|
||||||
after do
|
after do
|
||||||
|
ActiveRecord::Base.connection.reset!
|
||||||
|
|
||||||
ActiveRecord::Base.exec_sql <<~SQL
|
ActiveRecord::Base.exec_sql <<~SQL
|
||||||
DROP TABLE IF EXISTS #{table_name};
|
DROP TABLE IF EXISTS #{table_name};
|
||||||
DROP TRIGGER IF EXISTS #{table_name}_email_readonly ON #{table_name};
|
DROP TRIGGER IF EXISTS #{table_name}_email_readonly ON #{table_name};
|
||||||
|
@ -81,8 +83,6 @@ RSpec.describe ColumnDropper do
|
||||||
PG::RaiseException,
|
PG::RaiseException,
|
||||||
/Discourse: email in #{table_name} is readonly/
|
/Discourse: email in #{table_name} is readonly/
|
||||||
)
|
)
|
||||||
|
|
||||||
ActiveRecord::Base.exec_sql("ROLLBACK")
|
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'should allow updates to the other columns' do
|
it 'should allow updates to the other columns' do
|
||||||
|
@ -107,8 +107,6 @@ RSpec.describe ColumnDropper do
|
||||||
PG::RaiseException,
|
PG::RaiseException,
|
||||||
/Discourse: email in table_with_readonly_column is readonly/
|
/Discourse: email in table_with_readonly_column is readonly/
|
||||||
)
|
)
|
||||||
|
|
||||||
ActiveRecord::Base.exec_sql("ROLLBACK")
|
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'should allow insertions to the other columns' do
|
it 'should allow insertions to the other columns' do
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue