diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-01-08 18:10:26 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-01-08 18:10:26 +0300 |
commit | 6e734c809b18a0470d81c78e1ecd9b3f8278de89 (patch) | |
tree | 882251dce981323bc3c6e305cbc0f41aa4c39aae /spec/serializers/deploy_key_entity_spec.rb | |
parent | 9157fbe06fde892c647403f477ce31c888cbc822 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/serializers/deploy_key_entity_spec.rb')
-rw-r--r-- | spec/serializers/deploy_key_entity_spec.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/spec/serializers/deploy_key_entity_spec.rb b/spec/serializers/deploy_key_entity_spec.rb index 3404d27a23c..e8d9701be67 100644 --- a/spec/serializers/deploy_key_entity_spec.rb +++ b/spec/serializers/deploy_key_entity_spec.rb @@ -52,7 +52,13 @@ RSpec.describe DeployKeyEntity do context 'user is an admin' do let(:user) { create(:user, :admin) } - it { expect(entity.as_json).to include(can_edit: true) } + context 'when admin mode is enabled', :enable_admin_mode do + it { expect(entity.as_json).to include(can_edit: true) } + end + + context 'when admin mode is disabled' do + it { expect(entity.as_json).not_to include(can_edit: true) } + end end context 'user is a project maintainer' do |