Commit cce8955b authored by Peter Leitzen's avatar Peter Leitzen

Add policy read_cross_project specs for anonymous

parent 428f35cc
...@@ -30,6 +30,12 @@ describe BasePolicy, :do_not_mock_admin_mode do ...@@ -30,6 +30,12 @@ describe BasePolicy, :do_not_mock_admin_mode do
it { is_expected.to be_allowed(:read_cross_project) } it { is_expected.to be_allowed(:read_cross_project) }
context 'for anonymous' do
let(:current_user) { nil }
it { is_expected.to be_allowed(:read_cross_project) }
end
context 'when an external authorization service is enabled' do context 'when an external authorization service is enabled' do
before do before do
enable_external_authorization_service_check enable_external_authorization_service_check
...@@ -52,6 +58,12 @@ describe BasePolicy, :do_not_mock_admin_mode do ...@@ -52,6 +58,12 @@ describe BasePolicy, :do_not_mock_admin_mode do
is_expected.not_to be_allowed(:read_cross_project) is_expected.not_to be_allowed(:read_cross_project)
end end
end end
context 'for anonymous' do
let(:current_user) { nil }
it { is_expected.not_to be_allowed(:read_cross_project) }
end
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment