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:
authorDouwe Maan <douwe@gitlab.com>2015-04-21 16:19:23 +0300
committerDouwe Maan <douwe@gitlab.com>2015-04-24 13:30:36 +0300
commit0ff778c0f4a3b599d0f36a1deee5607d03e52b9a (patch)
treead89737763ed27faedec8e28ac338a4b1fb94b34 /spec/services
parent27af24c1c951385bccd298c98044d57ff22ccd1c (diff)
Link cross-project cross-reference notes to correct project.
Diffstat (limited to 'spec/services')
-rw-r--r--spec/services/git_push_service_spec.rb10
-rw-r--r--spec/services/notification_service_spec.rb4
2 files changed, 7 insertions, 7 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
diff --git a/spec/services/notification_service_spec.rb b/spec/services/notification_service_spec.rb
index 6d2bc41c2b9..2a54b2e920a 100644
--- a/spec/services/notification_service_spec.rb
+++ b/spec/services/notification_service_spec.rb
@@ -57,7 +57,7 @@ describe NotificationService do
end
it 'filters out "mentioned in" notes' do
- mentioned_note = Note.create_cross_reference_note(mentioned_issue, issue, issue.author, issue.project)
+ mentioned_note = Note.create_cross_reference_note(mentioned_issue, issue, issue.author)
expect(Notify).not_to receive(:note_issue_email)
notification.new_note(mentioned_note)
@@ -128,7 +128,7 @@ describe NotificationService do
end
it 'filters out "mentioned in" notes' do
- mentioned_note = Note.create_cross_reference_note(mentioned_issue, issue, issue.author, issue.project)
+ mentioned_note = Note.create_cross_reference_note(mentioned_issue, issue, issue.author)
expect(Notify).not_to receive(:note_issue_email)
notification.new_note(mentioned_note)