diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-05-22 23:41:14 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-05-22 23:41:14 +0300 |
commit | 9e92b0eead3c2b6dabf377f119cd1f91fd645a42 (patch) | |
tree | ab1aede5e3ddc2d147c9188ae1266cb33f049bea /spec/lib/gitlab/database/migration_helpers_spec.rb | |
parent | 13bf612600f126faddb4de5e8376a27a466ff830 (diff) |
Add specs for migration helpers and boolean values
Diffstat (limited to 'spec/lib/gitlab/database/migration_helpers_spec.rb')
-rw-r--r-- | spec/lib/gitlab/database/migration_helpers_spec.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/lib/gitlab/database/migration_helpers_spec.rb b/spec/lib/gitlab/database/migration_helpers_spec.rb index 642954f8d2d..35ade7a2be0 100644 --- a/spec/lib/gitlab/database/migration_helpers_spec.rb +++ b/spec/lib/gitlab/database/migration_helpers_spec.rb @@ -58,6 +58,12 @@ describe Gitlab::Database::MigrationHelpers, lib: true do expect(Project.where(import_error: 'foo').count).to eq(5) 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 describe '#add_column_with_default' do |