summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2015-07-13 18:33:50 -0400
committerRobert Speicher <rspeicher@gmail.com>2015-07-13 21:31:16 -0400
commitf3d4767d0c78daf315e6b653bed3a3a3ee308072 (patch)
treebddd6e6ca56fa486d95187e3e2020b68e25f4512 /spec
parente4c698fd5ce77e46e3851384c14271eb74c3c9ee (diff)
downloadgitlab-ce-f3d4767d0c78daf315e6b653bed3a3a3ee308072.tar.gz
Rename `notice_added_references` to `create_new_cross_references!`rs-issue-1773
Diffstat (limited to 'spec')
-rw-r--r--spec/models/concerns/mentionable_spec.rb10
-rw-r--r--spec/support/mentionable_shared_examples.rb2
2 files changed, 6 insertions, 6 deletions
diff --git a/spec/models/concerns/mentionable_spec.rb b/spec/models/concerns/mentionable_spec.rb
index 82e8a83bb3d..2d6fe003215 100644
--- a/spec/models/concerns/mentionable_spec.rb
+++ b/spec/models/concerns/mentionable_spec.rb
@@ -29,7 +29,7 @@ describe Issue, "Mentionable" do
end
end
- describe '#notice_added_references' do
+ describe '#create_new_cross_references!' do
let(:project) { create(:project) }
let(:issues) { create_list(:issue, 2, project: project) }
@@ -40,7 +40,7 @@ describe Issue, "Mentionable" do
expect(SystemNoteService).not_to receive(:cross_reference)
issue.description = 'New description'
- issue.notice_added_references
+ issue.create_new_cross_references!
end
it 'notifies new references' do
@@ -49,7 +49,7 @@ describe Issue, "Mentionable" do
expect(SystemNoteService).to receive(:cross_reference).with(issues[1], any_args)
issue.description = issues[1].to_reference
- issue.notice_added_references
+ issue.create_new_cross_references!
end
end
@@ -60,7 +60,7 @@ describe Issue, "Mentionable" do
expect(SystemNoteService).not_to receive(:cross_reference)
issue.update_attributes(description: 'New description')
- issue.notice_added_references
+ issue.create_new_cross_references!
end
it 'notifies new references' do
@@ -69,7 +69,7 @@ describe Issue, "Mentionable" do
expect(SystemNoteService).to receive(:cross_reference).with(issues[1], any_args)
issue.update_attributes(description: issues[1].to_reference)
- issue.notice_added_references
+ issue.create_new_cross_references!
end
end
diff --git a/spec/support/mentionable_shared_examples.rb b/spec/support/mentionable_shared_examples.rb
index a2a0b6905f9..f0717e61781 100644
--- a/spec/support/mentionable_shared_examples.rb
+++ b/spec/support/mentionable_shared_examples.rb
@@ -143,6 +143,6 @@ shared_examples 'an editable mentionable' do
end
set_mentionable_text.call(new_text)
- subject.notice_added_references(project, author)
+ subject.create_new_cross_references!(project, author)
end
end