diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-27 18:08:12 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-27 18:08:12 +0000 |
commit | 41c9fff024a72e6581e71c2ae080bdcb961a5601 (patch) | |
tree | b36a268efbaee403fa424048f030d5e281dcfbf8 /spec/rubocop | |
parent | fb73ca3398c2ac49a616ab553e117b0586089702 (diff) | |
download | gitlab-ce-41c9fff024a72e6581e71c2ae080bdcb961a5601.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/rubocop')
-rw-r--r-- | spec/rubocop/cop/migration/add_column_with_default_spec.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/spec/rubocop/cop/migration/add_column_with_default_spec.rb b/spec/rubocop/cop/migration/add_column_with_default_spec.rb index 3d2315ddfa1..d309a960e2f 100644 --- a/spec/rubocop/cop/migration/add_column_with_default_spec.rb +++ b/spec/rubocop/cop/migration/add_column_with_default_spec.rb @@ -27,7 +27,7 @@ describe RuboCop::Cop::Migration::AddColumnWithDefault do allow(cop).to receive(:in_migration?).and_return(true) end - let(:offense) { '`add_column_with_default` with `allow_null: false` may cause prolonged lock situations and downtime, see https://gitlab.com/gitlab-org/gitlab/issues/38060' } + let(:offense) { '`add_column_with_default` without `allow_null: true` may cause prolonged lock situations and downtime, see https://gitlab.com/gitlab-org/gitlab/issues/38060' } it 'registers an offense when specifying allow_null: false' do expect_offense(<<~RUBY) @@ -46,10 +46,11 @@ describe RuboCop::Cop::Migration::AddColumnWithDefault do RUBY end - it 'registers no offense when allow_null is not specified' do - expect_no_offenses(<<~RUBY) + it 'registers an offense when allow_null is not specified' do + expect_offense(<<~RUBY) def up add_column_with_default(:ci_build_needs, :artifacts, :boolean, default: true) + ^^^^^^^^^^^^^^^^^^^^^^^ #{offense} end RUBY end |