diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-30 15:40:01 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-30 15:40:01 +0300 |
commit | f19a0fa10a0024fab5ef3c556612944f2a62c298 (patch) | |
tree | ef5c359820d2409cf07c0610122299d314ec4743 /spec/services/resource_access_tokens | |
parent | eba52140851d2fb08665119c0a3997d0612ccb88 (diff) |
Add latest changes from gitlab-org/security/gitlab@14-2-stable-ee
Diffstat (limited to 'spec/services/resource_access_tokens')
-rw-r--r-- | spec/services/resource_access_tokens/create_service_spec.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/services/resource_access_tokens/create_service_spec.rb b/spec/services/resource_access_tokens/create_service_spec.rb index 11069dc1bb8..42520ea26b2 100644 --- a/spec/services/resource_access_tokens/create_service_spec.rb +++ b/spec/services/resource_access_tokens/create_service_spec.rb @@ -110,6 +110,18 @@ RSpec.describe ResourceAccessTokens::CreateService do expect(resource.members.developers.map(&:user_id)).to include(bot_user.id) end end + + context 'when user is external' do + let(:user) { create(:user, :external) } + + before do + project.add_maintainer(user) + end + + it 'creates resource bot user with external status' do + expect(subject.payload[:access_token].user.external).to eq true + end + end end context 'personal access token' do |