diff options
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/note_spec.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/models/note_spec.rb b/spec/models/note_spec.rb index 670a6237788..1b44da75c40 100644 --- a/spec/models/note_spec.rb +++ b/spec/models/note_spec.rb @@ -1888,4 +1888,20 @@ RSpec.describe Note do end end end + + describe '#issuable_ability_name' do + subject { note.issuable_ability_name } + + context 'when not confidential note' do + let(:note) { build(:note) } + + it { is_expected.to eq :read_note } + end + + context 'when confidential note' do + let(:note) { build(:note, :confidential) } + + it { is_expected.to eq :read_internal_note } + end + end end |