diff options
author | Robert Speicher <rspeicher@gmail.com> | 2015-06-17 20:59:19 -0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-06-22 12:13:46 +0200 |
commit | 2120e2dd95dbbab81c4b818d6d860139bb6c5f0b (patch) | |
tree | 45c46b71d93851138f02d0891c5581616273e0d3 /spec/support | |
parent | 213d1a4768b4bb83aa1ca827682468c381cbe9c9 (diff) | |
download | gitlab-ce-2120e2dd95dbbab81c4b818d6d860139bb6c5f0b.tar.gz |
Replace remaining references to `Note.create_cross_reference_note`
Diffstat (limited to 'spec/support')
-rw-r--r-- | spec/support/mentionable_shared_examples.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/support/mentionable_shared_examples.rb b/spec/support/mentionable_shared_examples.rb index d29c8a55c82..a2a0b6905f9 100644 --- a/spec/support/mentionable_shared_examples.rb +++ b/spec/support/mentionable_shared_examples.rb @@ -80,7 +80,7 @@ shared_examples 'a mentionable' do ext_issue, ext_mr, ext_commit] mentioned_objects.each do |referenced| - expect(Note).to receive(:create_cross_reference_note). + expect(SystemNoteService).to receive(:cross_reference). with(referenced, subject.local_reference, author) end @@ -88,7 +88,7 @@ shared_examples 'a mentionable' do end it 'detects existing cross-references' do - Note.create_cross_reference_note(mentioned_issue, subject.local_reference, author) + SystemNoteService.cross_reference(mentioned_issue, subject.local_reference, author) expect(subject).to have_mentioned(mentioned_issue) expect(subject).not_to have_mentioned(mentioned_mr) @@ -132,13 +132,13 @@ shared_examples 'an editable mentionable' do # These three objects were already referenced, and should not receive new # notes [mentioned_issue, mentioned_commit, ext_issue].each do |oldref| - expect(Note).not_to receive(:create_cross_reference_note). + expect(SystemNoteService).not_to receive(:cross_reference). with(oldref, any_args) end # These two issues are new and should receive reference notes new_issues.each do |newref| - expect(Note).to receive(:create_cross_reference_note). + expect(SystemNoteService).to receive(:cross_reference). with(newref, subject.local_reference, author) end |