Commit 5ada96db authored by Robert Speicher's avatar Robert Speicher

Fix Note model spec

parent 2cca78b1
......@@ -82,8 +82,10 @@ class Note < ActiveRecord::Base
def create_cross_reference_note(noteable, mentioner, author)
gfm_reference = mentioner_gfm_ref(noteable, mentioner)
project = noteable.project
note_options = {
project: noteable.project,
project: project,
author: author,
note: cross_reference_note_content(gfm_reference),
system: true
......@@ -95,7 +97,6 @@ class Note < ActiveRecord::Base
note_options.merge!(noteable: noteable)
end
if noteable.is_a?(ExternalIssue)
project.issues_tracker.create_cross_reference_note(noteable, mentioner, author)
else
......
......@@ -380,7 +380,7 @@ describe Note do
jira_tracker.destroy!
end
subject { Note.create_cross_reference_note(jira_issue, mergereq, author, project) }
subject { Note.create_cross_reference_note(jira_issue, mergereq, author) }
it { is_expected.to eq(jira_status_message) }
end
......@@ -419,7 +419,7 @@ describe Note do
to_return(:body => jira_issue_comments)
end
subject { Note.create_cross_reference_note(jira_issue, commit, author, project) }
subject { Note.create_cross_reference_note(jira_issue, commit, author) }
it { is_expected.to eq(jira_status_message) }
end
......@@ -431,7 +431,7 @@ describe Note do
to_return(:body => "{\"comments\":[{\"body\":\"#{message}\"}]}")
end
subject { Note.create_cross_reference_note(jira_issue, commit, author, project) }
subject { Note.create_cross_reference_note(jira_issue, commit, author) }
it { is_expected.not_to eq(jira_status_message) }
end
end
......@@ -450,7 +450,7 @@ describe Note do
jira_tracker.destroy!
end
subject { Note.create_cross_reference_note(jira_issue, issue, author, project) }
subject { Note.create_cross_reference_note(jira_issue, issue, author) }
it { is_expected.to eq(jira_status_message) }
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment