summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
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