Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
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.rb12
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