diff options
Diffstat (limited to 'spec/helpers/issues_helper_spec.rb')
-rw-r--r-- | spec/helpers/issues_helper_spec.rb | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/spec/helpers/issues_helper_spec.rb b/spec/helpers/issues_helper_spec.rb index 0421c7b7458..58f06899cd6 100644 --- a/spec/helpers/issues_helper_spec.rb +++ b/spec/helpers/issues_helper_spec.rb @@ -302,7 +302,7 @@ RSpec.describe IssuesHelper do is_anonymous_search_disabled: 'true', is_issue_repositioning_disabled: 'true', is_project: 'true', - is_public_visibility_restricted: 'false', + is_public_visibility_restricted: Gitlab::CurrentSettings.restricted_visibility_levels ? 'false' : '', is_signed_in: current_user.present?.to_s, jira_integration_path: help_page_url('integration/jira/issues', anchor: 'view-jira-issues'), markdown_help_path: help_page_path('user/markdown'), @@ -337,6 +337,16 @@ RSpec.describe IssuesHelper do let(:current_user) { nil } end end + + context 'when restricted visibility levels is nil' do + before do + allow(Gitlab::CurrentSettings).to receive(:restricted_visibility_levels).and_return(nil) + end + + it_behaves_like 'issues list data' do + let(:current_user) { double.as_null_object } + end + end end describe '#group_issues_list_data' do |