summaryrefslogtreecommitdiff
path: root/spec/helpers
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-05-04 10:03:30 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-05-04 10:03:30 +0000
commitd35df0ad158c14cb28f583f4b26c4196ef23a3f7 (patch)
tree5a1992758772519104eacb5de2c231721876541c /spec/helpers
parent3c51da6f5782e53123a7ed5af98ba0828cbfa49f (diff)
downloadgitlab-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.rb19
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