diff options
author | Daniel Gerhardt <code@dgerhardt.net> | 2015-06-14 18:41:11 +0300 |
---|---|---|
committer | Daniel Gerhardt <code@dgerhardt.net> | 2015-06-14 18:41:11 +0300 |
commit | 92bb845e1ed18395615ba8a252de4a8b123c1914 (patch) | |
tree | 79167f865312bb98dd8a6c3b9d256a479ef8f3b7 /spec/services | |
parent | 5c6d83b8e772dedb753336d83783123e166fbe40 (diff) |
Fix hooks for web based events with external issue references
The creation of cross references for external issues (which would fail)
is now prevented.
Fixes #1650, GH-9333.
Diffstat (limited to 'spec/services')
-rw-r--r-- | spec/services/system_note_service_spec.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/services/system_note_service_spec.rb b/spec/services/system_note_service_spec.rb index 700286b585a..2658576640c 100644 --- a/spec/services/system_note_service_spec.rb +++ b/spec/services/system_note_service_spec.rb @@ -338,6 +338,15 @@ describe SystemNoteService do to be_falsey end end + + context 'when notable is an ExternalIssue' do + let(:noteable) { ExternalIssue.new('EXT-1234', project) } + it 'is truthy' do + mentioner = noteable.dup + expect(described_class.cross_reference_disallowed?(noteable, mentioner)). + to be_truthy + end + end end describe '.cross_reference_exists?' do |