Commit 9e92b0ee authored by Grzegorz Bizon's avatar Grzegorz Bizon

Add specs for migration helpers and boolean values

parent 13bf6126
...@@ -58,6 +58,12 @@ describe Gitlab::Database::MigrationHelpers, lib: true do ...@@ -58,6 +58,12 @@ describe Gitlab::Database::MigrationHelpers, lib: true do
expect(Project.where(import_error: 'foo').count).to eq(5) expect(Project.where(import_error: 'foo').count).to eq(5)
end end
it 'updates boolean values correctly' do
model.update_column_in_batches(:projects, :archived, true)
expect(Project.where(archived: true).count).to eq(5)
end
end end
describe '#add_column_with_default' do describe '#add_column_with_default' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment