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/lib/gitlab/import/merge_request_helpers_spec.rb')
-rw-r--r--spec/lib/gitlab/import/merge_request_helpers_spec.rb7
1 files changed, 2 insertions, 5 deletions
diff --git a/spec/lib/gitlab/import/merge_request_helpers_spec.rb b/spec/lib/gitlab/import/merge_request_helpers_spec.rb
index f858ab934bb..9626b7b893f 100644
--- a/spec/lib/gitlab/import/merge_request_helpers_spec.rb
+++ b/spec/lib/gitlab/import/merge_request_helpers_spec.rb
@@ -37,11 +37,8 @@ RSpec.describe Gitlab::Import::MergeRequestHelpers, type: :helper do
attributes.merge(iid: iid, source_branch: iid.to_s))
end
- # does ensure that we only load object twice
- # 1. by #insert_and_return_id
- # 2. by project.merge_requests.find
- expect_any_instance_of(MergeRequest).to receive(:attributes)
- .twice.times.and_call_original
+ # ensures that we only load object once by project.merge_requests.find
+ expect(MergeRequest).to receive(:allocate).once.and_call_original
expect(subject.first).not_to be_nil
expect(subject.second).to eq(false)