mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 03:18:09 +08:00
Add option to skip tabels when using DbHelper.remap
.
This commit is contained in:
@ -32,5 +32,13 @@ RSpec.describe DbHelper do
|
||||
expect(badge_attributes.except("query"))
|
||||
.to eq(badge.attributes.except("query"))
|
||||
end
|
||||
|
||||
it 'allows tables to be excluded from scanning' do
|
||||
post = Fabricate(:post, cooked: "test")
|
||||
|
||||
DbHelper.remap("test", "something else", exclude_tables: %w{posts})
|
||||
|
||||
expect(post.reload.cooked).to eq('test')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user