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
Jérome Perrin
gitlab-ce
Commits
e0ca65c5
Commit
e0ca65c5
authored
Oct 30, 2017
by
Mike Greiling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add accept_confirm around attempts to revoke personal access tokens
parent
5a0e41a5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
spec/features/profiles/personal_access_tokens_spec.rb
spec/features/profiles/personal_access_tokens_spec.rb
+2
-2
No files found.
spec/features/profiles/personal_access_tokens_spec.rb
View file @
e0ca65c5
...
@@ -78,7 +78,7 @@ describe 'Profile > Personal Access Tokens', :js do
...
@@ -78,7 +78,7 @@ describe 'Profile > Personal Access Tokens', :js do
it
"allows revocation of an active token"
do
it
"allows revocation of an active token"
do
visit
profile_personal_access_tokens_path
visit
profile_personal_access_tokens_path
click_on
"Revoke"
accept_confirm
{
click_on
"Revoke"
}
expect
(
page
).
to
have_selector
(
".settings-message"
)
expect
(
page
).
to
have_selector
(
".settings-message"
)
expect
(
no_personal_access_tokens_message
).
to
have_text
(
"This user has no active Personal Access Tokens."
)
expect
(
no_personal_access_tokens_message
).
to
have_text
(
"This user has no active Personal Access Tokens."
)
...
@@ -100,7 +100,7 @@ describe 'Profile > Personal Access Tokens', :js do
...
@@ -100,7 +100,7 @@ describe 'Profile > Personal Access Tokens', :js do
errors
=
ActiveModel
::
Errors
.
new
(
PersonalAccessToken
.
new
).
tap
{
|
e
|
e
.
add
(
:name
,
"cannot be nil"
)
}
errors
=
ActiveModel
::
Errors
.
new
(
PersonalAccessToken
.
new
).
tap
{
|
e
|
e
.
add
(
:name
,
"cannot be nil"
)
}
allow_any_instance_of
(
PersonalAccessToken
).
to
receive
(
:errors
).
and_return
(
errors
)
allow_any_instance_of
(
PersonalAccessToken
).
to
receive
(
:errors
).
and_return
(
errors
)
click_on
"Revoke"
accept_confirm
{
click_on
"Revoke"
}
expect
(
active_personal_access_tokens
).
to
have_text
(
personal_access_token
.
name
)
expect
(
active_personal_access_tokens
).
to
have_text
(
personal_access_token
.
name
)
expect
(
page
).
to
have_content
(
"Could not revoke"
)
expect
(
page
).
to
have_content
(
"Could not revoke"
)
end
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