Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-11-01 14:56:29 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-11-01 14:56:34 +0300
commitb3904b36e0302c177eec99ee0fa35eeacfbe79f4 (patch)
treec5eecfd3a8034d32134db5125ee605397eca9fed /spec/models
parentf12386aa9acf19877161bfc77e55572f40509cc4 (diff)
Add latest changes from gitlab-org/security/gitlab@15-5-stable-ee
Diffstat (limited to 'spec/models')
-rw-r--r--spec/models/note_spec.rb16
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