diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-17 14:59:07 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-17 14:59:07 +0300 |
commit | 8b573c94895dc0ac0e1d9d59cf3e8745e8b539ca (patch) | |
tree | 544930fb309b30317ae9797a9683768705d664c4 /spec/migrations/add_unique_constraint_to_approvals_user_id_and_merge_request_id_spec.rb | |
parent | 4b1de649d0168371549608993deac953eb692019 (diff) |
Add latest changes from gitlab-org/gitlab@13-7-stable-eev13.7.0-rc42
Diffstat (limited to 'spec/migrations/add_unique_constraint_to_approvals_user_id_and_merge_request_id_spec.rb')
-rw-r--r-- | spec/migrations/add_unique_constraint_to_approvals_user_id_and_merge_request_id_spec.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/migrations/add_unique_constraint_to_approvals_user_id_and_merge_request_id_spec.rb b/spec/migrations/add_unique_constraint_to_approvals_user_id_and_merge_request_id_spec.rb index 6c04be5fc60..391bc59cdc0 100644 --- a/spec/migrations/add_unique_constraint_to_approvals_user_id_and_merge_request_id_spec.rb +++ b/spec/migrations/add_unique_constraint_to_approvals_user_id_and_merge_request_id_spec.rb @@ -12,15 +12,15 @@ RSpec.describe AddUniqueConstraintToApprovalsUserIdAndMergeRequestId do describe '#up' do before do - namespaces.create(id: 1, name: 'ns', path: 'ns') - projects.create(id: 1, namespace_id: 1) - merge_requests.create(id: 1, target_branch: 'master', source_branch: 'feature-1', target_project_id: 1) - merge_requests.create(id: 2, target_branch: 'master', source_branch: 'feature-2', target_project_id: 1) + namespaces.create!(id: 1, name: 'ns', path: 'ns') + projects.create!(id: 1, namespace_id: 1) + merge_requests.create!(id: 1, target_branch: 'master', source_branch: 'feature-1', target_project_id: 1) + merge_requests.create!(id: 2, target_branch: 'master', source_branch: 'feature-2', target_project_id: 1) end it 'deletes duplicate records and keeps the first one' do - first_approval = approvals.create(id: 1, merge_request_id: 1, user_id: 1) - approvals.create(id: 2, merge_request_id: 1, user_id: 1) + first_approval = approvals.create!(id: 1, merge_request_id: 1, user_id: 1) + approvals.create!(id: 2, merge_request_id: 1, user_id: 1) migration.up |