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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
668844f5
Commit
668844f5
authored
Mar 07, 2017
by
Douwe Maan
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix-specs-for-access-tokens' into 'master'
Fix access token specs See merge request !9776
parents
57e70975
8549f7aa
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
app/controllers/admin/impersonation_tokens_controller.rb
app/controllers/admin/impersonation_tokens_controller.rb
+1
-1
spec/controllers/profiles/personal_access_tokens_spec.rb
spec/controllers/profiles/personal_access_tokens_spec.rb
+2
-2
No files found.
app/controllers/admin/impersonation_tokens_controller.rb
View file @
668844f5
...
...
@@ -44,7 +44,7 @@ class Admin::ImpersonationTokensController < Admin::ApplicationController
end
def
set_index_vars
@scopes
=
Gitlab
::
Auth
::
SCOPES
@scopes
=
Gitlab
::
Auth
::
API_
SCOPES
@impersonation_token
||=
finder
.
build
@inactive_impersonation_tokens
=
finder
(
state:
'inactive'
).
execute
...
...
spec/controllers/profiles/personal_access_tokens_spec.rb
View file @
668844f5
...
...
@@ -15,10 +15,10 @@ describe Profiles::PersonalAccessTokensController do
name
=
FFaker
::
Product
.
brand
scopes
=
%w[api read_user]
post
:create
,
personal_access_token:
token_attributes
.
merge
(
scopes:
scopes
)
post
:create
,
personal_access_token:
token_attributes
.
merge
(
scopes:
scopes
,
name:
name
)
expect
(
created_token
).
not_to
be_nil
expect
(
created_token
.
name
).
to
eq
(
token_attributes
[
:name
]
)
expect
(
created_token
.
name
).
to
eq
(
name
)
expect
(
created_token
.
scopes
).
to
eq
(
scopes
)
expect
(
PersonalAccessToken
.
active
).
to
include
(
created_token
)
end
...
...
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