summaryrefslogtreecommitdiff
path: root/spec/models/concerns/mentionable_spec.rb
blob: eadb941a3fa8780eb5789e890760c9661295c89d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
require 'spec_helper'

describe Issue, "Mentionable" do
  describe :mentioned_users do
    let!(:user) { create(:user, username: 'stranger') }
    let!(:user2) { create(:user, username: 'john') }
    let!(:issue) { create(:issue, description: '@stranger mentioned') }

    subject { issue.mentioned_users }

    it { is_expected.to include(user) }
    it { is_expected.not_to include(user2) }
  end
end