diff options
author | Robert Speicher <rspeicher@gmail.com> | 2015-05-21 23:35:15 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2015-05-26 22:49:22 +0300 |
commit | 5a9c5520d9e63a38ed8b839be8430a5b5815da67 (patch) | |
tree | 9419a59b0eb796e77688871a19a8c20daf2809b5 /spec/services | |
parent | 68f74aa82690ca83faf81654737f7d0caefdfbd3 (diff) |
Make use of to_reference in more specs
Diffstat (limited to 'spec/services')
-rw-r--r-- | spec/services/system_note_service_spec.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/services/system_note_service_spec.rb b/spec/services/system_note_service_spec.rb index 4e4cb6d19ed..ec173fa322d 100644 --- a/spec/services/system_note_service_spec.rb +++ b/spec/services/system_note_service_spec.rb @@ -238,13 +238,13 @@ describe SystemNoteService do let(:mentioner) { project2.repository.commit } it 'references the mentioning commit' do - expect(subject.note).to eq "mentioned in commit #{project2.path_with_namespace}@#{mentioner.id}" + expect(subject.note).to eq "mentioned in commit #{mentioner.to_reference(project)}" end end context 'from non-Commit' do it 'references the mentioning object' do - expect(subject.note).to eq "mentioned in issue #{project2.path_with_namespace}##{mentioner.iid}" + expect(subject.note).to eq "mentioned in issue #{mentioner.to_reference(project)}" end end end @@ -254,13 +254,13 @@ describe SystemNoteService do let(:mentioner) { project.repository.commit } it 'references the mentioning commit' do - expect(subject.note).to eq "mentioned in commit #{mentioner.id}" + expect(subject.note).to eq "mentioned in commit #{mentioner.to_reference}" end end context 'from non-Commit' do it 'references the mentioning object' do - expect(subject.note).to eq "mentioned in issue ##{mentioner.iid}" + expect(subject.note).to eq "mentioned in issue #{mentioner.to_reference}" end end end @@ -270,7 +270,7 @@ describe SystemNoteService do describe '.cross_reference?' do it 'is truthy when text begins with expected text' do - expect(described_class.cross_reference?('mentioned in issue #1')).to be_truthy + expect(described_class.cross_reference?('mentioned in something')).to be_truthy end it 'is falsey when text does not begin with expected text' do |