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:
authorWinnie Hellmann <winnie@gitlab.com>2019-02-21 19:55:01 +0300
committerWinnie Hellmann <winnie@gitlab.com>2019-02-21 19:55:01 +0300
commit30dd5a65f78bea09658d49be1917ff7dd71a42d0 (patch)
tree4d9f3ae1c544c0c16ec24b33e395efe28a2c2741 /spec/javascripts/fixtures
parentfd46e8eec1b12f0281872718b3fdbce2bd9fe1e5 (diff)
Make fixtures/merge_requests.rb deterministic
Diffstat (limited to 'spec/javascripts/fixtures')
-rw-r--r--spec/javascripts/fixtures/merge_requests.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/spec/javascripts/fixtures/merge_requests.rb b/spec/javascripts/fixtures/merge_requests.rb
index 26e81f06c0b..eb37be87e1d 100644
--- a/spec/javascripts/fixtures/merge_requests.rb
+++ b/spec/javascripts/fixtures/merge_requests.rb
@@ -35,6 +35,7 @@ describe Projects::MergeRequestsController, '(JavaScript fixtures)', type: :cont
before do
sign_in(admin)
+ allow(Discussion).to receive(:build_discussion_id).and_return(['discussionid:ceterumcenseo'])
end
after do
@@ -54,8 +55,10 @@ describe Projects::MergeRequestsController, '(JavaScript fixtures)', type: :cont
end
it 'merge_requests/merged_merge_request.html.raw' do |example|
- allow_any_instance_of(MergeRequest).to receive(:source_branch_exists?).and_return(true)
- allow_any_instance_of(MergeRequest).to receive(:can_remove_source_branch?).and_return(true)
+ expect_next_instance_of(MergeRequest) do |merge_request|
+ allow(merge_request).to receive(:source_branch_exists?).and_return(true)
+ allow(merge_request).to receive(:can_remove_source_branch?).and_return(true)
+ end
render_merge_request(example.description, merged_merge_request)
end