diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-04-21 16:19:23 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-04-24 13:30:36 +0300 |
commit | 0ff778c0f4a3b599d0f36a1deee5607d03e52b9a (patch) | |
tree | ad89737763ed27faedec8e28ac338a4b1fb94b34 /spec/services/git_push_service_spec.rb | |
parent | 27af24c1c951385bccd298c98044d57ff22ccd1c (diff) |
Link cross-project cross-reference notes to correct project.
Diffstat (limited to 'spec/services/git_push_service_spec.rb')
-rw-r--r-- | spec/services/git_push_service_spec.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/services/git_push_service_spec.rb b/spec/services/git_push_service_spec.rb index 246bc1cc33d..af37e8319a4 100644 --- a/spec/services/git_push_service_spec.rb +++ b/spec/services/git_push_service_spec.rb @@ -164,22 +164,22 @@ describe GitPushService do end it "creates a note if a pushed commit mentions an issue" do - expect(Note).to receive(:create_cross_reference_note).with(issue, commit, commit_author, project) + expect(Note).to receive(:create_cross_reference_note).with(issue, commit, commit_author) service.execute(project, user, @oldrev, @newrev, @ref) end it "only creates a cross-reference note if one doesn't already exist" do - Note.create_cross_reference_note(issue, commit, user, project) + Note.create_cross_reference_note(issue, commit, user) - expect(Note).not_to receive(:create_cross_reference_note).with(issue, commit, commit_author, project) + expect(Note).not_to receive(:create_cross_reference_note).with(issue, commit, commit_author) service.execute(project, user, @oldrev, @newrev, @ref) end it "defaults to the pushing user if the commit's author is not known" do commit.stub(author_name: 'unknown name', author_email: 'unknown@email.com') - expect(Note).to receive(:create_cross_reference_note).with(issue, commit, user, project) + expect(Note).to receive(:create_cross_reference_note).with(issue, commit, user) service.execute(project, user, @oldrev, @newrev, @ref) end @@ -188,7 +188,7 @@ describe GitPushService do allow(project.repository).to receive(:commits_between).with(@blankrev, @newrev).and_return([]) allow(project.repository).to receive(:commits_between).with("master", @newrev).and_return([commit]) - expect(Note).to receive(:create_cross_reference_note).with(issue, commit, commit_author, project) + expect(Note).to receive(:create_cross_reference_note).with(issue, commit, commit_author) service.execute(project, user, @blankrev, @newrev, 'refs/heads/other') end |