diff options
Diffstat (limited to 'spec/models/concerns/mentionable_spec.rb')
-rw-r--r-- | spec/models/concerns/mentionable_spec.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/models/concerns/mentionable_spec.rb b/spec/models/concerns/mentionable_spec.rb index 6179882e935..20f0c561e44 100644 --- a/spec/models/concerns/mentionable_spec.rb +++ b/spec/models/concerns/mentionable_spec.rb @@ -1,5 +1,22 @@ require 'spec_helper' +describe Mentionable do + include Mentionable + + def author + nil + end + + describe :references do + let(:project) { create(:project) } + + it 'excludes JIRA references' do + allow(project).to receive_messages(jira_tracker?: true) + expect(referenced_mentionables(project, 'JIRA-123')).to be_empty + end + end +end + describe Issue, "Mentionable" do describe '#mentioned_users' do let!(:user) { create(:user, username: 'stranger') } |