From 6653ccc011dec86e5140a5d09ea3b2357eab6714 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Fri, 12 Mar 2021 16:26:10 +0000 Subject: Add latest changes from gitlab-org/gitlab@13-10-stable-ee --- spec/helpers/visibility_level_helper_spec.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'spec/helpers/visibility_level_helper_spec.rb') 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 -- cgit v1.2.1