diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-06 15:08:38 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-06 15:08:38 +0300 |
commit | 6ab9cdec264a9caf7e4eb5519fcae5ac65a18b15 (patch) | |
tree | 28afca02f01c1b9d22a5e4227521a575fae57bea /spec/rubocop/cop/migration | |
parent | 497d517e130ac88cbdee69c4c9e88938e164fc52 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/rubocop/cop/migration')
-rw-r--r-- | spec/rubocop/cop/migration/add_concurrent_foreign_key_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/rubocop/cop/migration/add_concurrent_foreign_key_spec.rb b/spec/rubocop/cop/migration/add_concurrent_foreign_key_spec.rb index b43d44dba65..aaf191a1b6b 100644 --- a/spec/rubocop/cop/migration/add_concurrent_foreign_key_spec.rb +++ b/spec/rubocop/cop/migration/add_concurrent_foreign_key_spec.rb @@ -36,5 +36,15 @@ RSpec.describe RuboCop::Cop::Migration::AddConcurrentForeignKey, type: :rubocop expect(cop.offenses).to be_empty end + + it 'does not register an offense when `add_foreign_key` is within `with_lock_retries`' do + inspect_source <<~RUBY + with_lock_retries do + add_foreign_key :key, :projects, column: :project_id, on_delete: :cascade + end + RUBY + + expect(cop.offenses).to be_empty + end end end |