diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-04 10:03:30 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-04 10:03:30 +0000 |
commit | d35df0ad158c14cb28f583f4b26c4196ef23a3f7 (patch) | |
tree | 5a1992758772519104eacb5de2c231721876541c /spec/helpers | |
parent | 3c51da6f5782e53123a7ed5af98ba0828cbfa49f (diff) | |
download | gitlab-ce-d35df0ad158c14cb28f583f4b26c4196ef23a3f7.tar.gz |
Add latest changes from gitlab-org/gitlab@12-10-stable-ee
Diffstat (limited to 'spec/helpers')
-rw-r--r-- | spec/helpers/explore_helper_spec.rb | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/spec/helpers/explore_helper_spec.rb b/spec/helpers/explore_helper_spec.rb index f8240dd3a4c..1a6af3be055 100644 --- a/spec/helpers/explore_helper_spec.rb +++ b/spec/helpers/explore_helper_spec.rb @@ -19,23 +19,10 @@ describe ExploreHelper do end describe '#public_visibility_restricted?' do - using RSpec::Parameterized::TableSyntax + it 'delegates to Gitlab::VisibilityLevel' do + expect(Gitlab::VisibilityLevel).to receive(:public_visibility_restricted?).and_call_original - where(:visibility_levels, :expected_status) do - nil | nil - [Gitlab::VisibilityLevel::PRIVATE] | false - [Gitlab::VisibilityLevel::PRIVATE, Gitlab::VisibilityLevel::INTERNAL] | false - [Gitlab::VisibilityLevel::PUBLIC] | true - end - - with_them do - before do - stub_application_setting(restricted_visibility_levels: visibility_levels) - end - - it 'returns the expected status' do - expect(helper.public_visibility_restricted?).to eq(expected_status) - end + helper.public_visibility_restricted? end end end |