diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-16 15:07:43 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-16 15:07:43 +0300 |
commit | d10a462fedbd7794a83abdba9b4526600f71de5b (patch) | |
tree | 4dbd21cb89013d9e07b05bac5101cd13585a8be5 /spec/services/system_note_service_spec.rb | |
parent | 13867d66e92c2fd8962a126db4fbdc32891343c9 (diff) |
Add latest changes from gitlab-org/gitlab@masterogolowinski-master-patch-80898
Diffstat (limited to 'spec/services/system_note_service_spec.rb')
-rw-r--r-- | spec/services/system_note_service_spec.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/spec/services/system_note_service_spec.rb b/spec/services/system_note_service_spec.rb index bb457217b3f..a952e26e338 100644 --- a/spec/services/system_note_service_spec.rb +++ b/spec/services/system_note_service_spec.rb @@ -467,7 +467,9 @@ describe SystemNoteService do before do allow(JIRA::Resource::Remotelink).to receive(:all).and_return([]) message = "[#{author.name}|http://localhost/#{author.username}] mentioned this issue in [a commit of #{project.full_path}|http://localhost/#{project.full_path}/commit/#{commit.id}]:\n'#{commit.title.chomp}'" - allow_any_instance_of(JIRA::Resource::Issue).to receive(:comments).and_return([OpenStruct.new(body: message)]) + allow_next_instance_of(JIRA::Resource::Issue) do |instance| + allow(instance).to receive(:comments).and_return([OpenStruct.new(body: message)]) + end end it "does not return success message" do |