summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-05-22 22:41:14 +0200
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-05-22 22:41:14 +0200
commit9e92b0eead3c2b6dabf377f119cd1f91fd645a42 (patch)
treeab1aede5e3ddc2d147c9188ae1266cb33f049bea /spec
parent13bf612600f126faddb4de5e8376a27a466ff830 (diff)
downloadgitlab-ce-9e92b0eead3c2b6dabf377f119cd1f91fd645a42.tar.gz
Add specs for migration helpers and boolean values
Diffstat (limited to 'spec')
-rw-r--r--spec/lib/gitlab/database/migration_helpers_spec.rb6
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