diff options
Diffstat (limited to 'spec/lib/gitlab/auth_spec.rb')
-rw-r--r-- | spec/lib/gitlab/auth_spec.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/lib/gitlab/auth_spec.rb b/spec/lib/gitlab/auth_spec.rb index f5a74956174..1e869df0988 100644 --- a/spec/lib/gitlab/auth_spec.rb +++ b/spec/lib/gitlab/auth_spec.rb @@ -481,6 +481,17 @@ RSpec.describe Gitlab::Auth, :use_clean_rails_memory_store_caching do end it_behaves_like 'with an invalid access token' + + context 'when the token belongs to a group via project share' do + let_it_be(:invited_group) { create(:group) } + + before do + invited_group.add_maintainer(project_bot_user) + create(:project_group_link, group: invited_group, project: project) + end + + it_behaves_like 'with a valid access token' + end end end end |