summaryrefslogtreecommitdiff
path: root/spec/policies
diff options
context:
space:
mode:
authorNick Thomas <nick@gitlab.com>2019-01-24 16:23:57 +0000
committerNick Thomas <nick@gitlab.com>2019-03-05 15:00:32 +0000
commit21779d00186d75349165d6c07dbe04aace68017c (patch)
tree25aaf112b51d6f5360a3e97db6f31f98a642660e /spec/policies
parent42d3117f9c3371e07e8b0aafab6f504e87251c2a (diff)
downloadgitlab-ce-21779d00186d75349165d6c07dbe04aace68017c.tar.gz
Add metadata about the GitLab server to GraphQL
Diffstat (limited to 'spec/policies')
-rw-r--r--spec/policies/global_policy_spec.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/policies/global_policy_spec.rb b/spec/policies/global_policy_spec.rb
index 30d68e7dc9d..12be3927e18 100644
--- a/spec/policies/global_policy_spec.rb
+++ b/spec/policies/global_policy_spec.rb
@@ -181,6 +181,18 @@ describe GlobalPolicy do
end
end
+ describe 'read instance metadata' do
+ context 'regular user' do
+ it { is_expected.to be_allowed(:read_instance_metadata) }
+ end
+
+ context 'anonymous' do
+ let(:current_user) { nil }
+
+ it { is_expected.not_to be_allowed(:read_instance_metadata) }
+ end
+ end
+
describe 'read instance statistics' do
context 'regular user' do
it { is_expected.to be_allowed(:read_instance_statistics) }