diff options
-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 |