summaryrefslogtreecommitdiff
path: root/spec/helpers/visibility_level_helper_spec.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-03-12 16:26:10 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-03-12 16:26:10 +0000
commit6653ccc011dec86e5140a5d09ea3b2357eab6714 (patch)
tree897193f37bcd98152a0ac214f80a3c4cfe1047c5 /spec/helpers/visibility_level_helper_spec.rb
parentbff35a05aed6a31380a73c39113808fd262c2c37 (diff)
downloadgitlab-ce-6653ccc011dec86e5140a5d09ea3b2357eab6714.tar.gz
Add latest changes from gitlab-org/gitlab@13-10-stable-eev13.10.0-rc41
Diffstat (limited to 'spec/helpers/visibility_level_helper_spec.rb')
-rw-r--r--spec/helpers/visibility_level_helper_spec.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/helpers/visibility_level_helper_spec.rb b/spec/helpers/visibility_level_helper_spec.rb
index 10e0815918f..2aac0cae0c6 100644
--- a/spec/helpers/visibility_level_helper_spec.rb
+++ b/spec/helpers/visibility_level_helper_spec.rb
@@ -33,6 +33,22 @@ RSpec.describe VisibilityLevelHelper do
end
end
+ describe 'visibility_level_label' do
+ using RSpec::Parameterized::TableSyntax
+
+ where(:level_value, :level_name) do
+ Gitlab::VisibilityLevel::PRIVATE | 'Private'
+ Gitlab::VisibilityLevel::INTERNAL | 'Internal'
+ Gitlab::VisibilityLevel::PUBLIC | 'Public'
+ end
+
+ with_them do
+ it 'returns the name of the visibility level' do
+ expect(visibility_level_label(level_value)).to eq(level_name)
+ end
+ end
+ end
+
describe 'visibility_level_description' do
context 'used with a Project' do
let(:descriptions) do