diff options
author | Winnie Hellmann <winnie@gitlab.com> | 2019-02-21 19:55:01 +0300 |
---|---|---|
committer | Winnie Hellmann <winnie@gitlab.com> | 2019-02-21 19:55:01 +0300 |
commit | 30dd5a65f78bea09658d49be1917ff7dd71a42d0 (patch) | |
tree | 4d9f3ae1c544c0c16ec24b33e395efe28a2c2741 /spec | |
parent | fd46e8eec1b12f0281872718b3fdbce2bd9fe1e5 (diff) |
Make fixtures/merge_requests.rb deterministic
Diffstat (limited to 'spec')
-rw-r--r-- | spec/javascripts/fixtures/merge_requests.rb | 7 |
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 |