Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
6f4b216b
Commit
6f4b216b
authored
Jan 07, 2021
by
Serena Fang
Committed by
Rémy Coutable
Jan 07, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add specs for nil project PAT authentication
parent
6233211d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
spec/lib/gitlab/auth_spec.rb
spec/lib/gitlab/auth_spec.rb
+5
-0
No files found.
spec/lib/gitlab/auth_spec.rb
View file @
6f4b216b
...
@@ -372,6 +372,11 @@ RSpec.describe Gitlab::Auth, :use_clean_rails_memory_store_caching do
...
@@ -372,6 +372,11 @@ RSpec.describe Gitlab::Auth, :use_clean_rails_memory_store_caching do
expect
(
gl_auth
.
find_for_git_client
(
project_bot_user
.
username
,
project_access_token
.
token
,
project:
project
,
ip:
'ip'
))
expect
(
gl_auth
.
find_for_git_client
(
project_bot_user
.
username
,
project_access_token
.
token
,
project:
project
,
ip:
'ip'
))
.
to
eq
(
Gitlab
::
Auth
::
Result
.
new
(
project_bot_user
,
nil
,
:personal_access_token
,
described_class
.
full_authentication_abilities
))
.
to
eq
(
Gitlab
::
Auth
::
Result
.
new
(
project_bot_user
,
nil
,
:personal_access_token
,
described_class
.
full_authentication_abilities
))
end
end
it
'successfully authenticates the project bot with a nil project'
do
expect
(
gl_auth
.
find_for_git_client
(
project_bot_user
.
username
,
project_access_token
.
token
,
project:
nil
,
ip:
'ip'
))
.
to
eq
(
Gitlab
::
Auth
::
Result
.
new
(
project_bot_user
,
nil
,
:personal_access_token
,
described_class
.
full_authentication_abilities
))
end
end
end
context
'with invalid project access token'
do
context
'with invalid project access token'
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment