diff options
author | James Lopez <james@jameslopez.es> | 2016-02-12 20:01:47 +0300 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2016-02-12 20:01:47 +0300 |
commit | 4089be8fedbe0499108b32dc0c08b6378efc534c (patch) | |
tree | e05f63c3b942cd488eeec38f4d5c0ba3a6e7fae7 /spec | |
parent | a5b011c9d8586453d37852856822dab692f6613b (diff) |
woo hoo - getting there with the cross-reference issue. Should fix the problem and updated spec
Diffstat (limited to 'spec')
-rw-r--r-- | spec/services/system_note_service_spec.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/spec/services/system_note_service_spec.rb b/spec/services/system_note_service_spec.rb index 655efa0670b..0c063fcb959 100644 --- a/spec/services/system_note_service_spec.rb +++ b/spec/services/system_note_service_spec.rb @@ -425,18 +425,20 @@ describe SystemNoteService, services: true do end end - context 'commit from fork' do + context 'commit with cross-reference from fork' do let(:author2) { create(:user) } let(:forked_project) { Projects::ForkService.new(project, author2).execute } let(:commit2) { forked_project.commit } before do - described_class.cross_reference(noteable, commit2, author2) + allow(commit0).to receive(:to_reference) { noteable.project.to_reference + + commit0.class.reference_prefix + commit0.id} + described_class.cross_reference(noteable, commit0, author2) end - it 'is falsey when is a fork mentioning an external issue' do + it 'is true when a fork mentions an external issue' do expect(described_class.cross_reference_exists?(noteable, commit2)). - to be_falsey + to be true end end end |