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
c1e57b47
Commit
c1e57b47
authored
Dec 29, 2014
by
Marin Jankovski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add feature spec for user ssh keys on admin page.
parent
f0085d03
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
0 deletions
+42
-0
features/admin/users.feature
features/admin/users.feature
+10
-0
features/steps/admin/users.rb
features/steps/admin/users.rb
+32
-0
No files found.
features/admin/users.feature
View file @
c1e57b47
...
...
@@ -35,3 +35,13 @@ Feature: Admin Users
And
I see the secondary email
When
I click remove secondary email
Then
I should not see secondary email anymore
Scenario
:
Show user keys
Given
user
"Pete"
with ssh keys
And
I visit admin users page
And
click on user
"Pete"
Then
I should see key list
And
I click on the key title
Then
I should see key details
And
I click on remove key
Then
I should see the key removed
features/steps/admin/users.rb
View file @
c1e57b47
...
...
@@ -82,4 +82,36 @@ class Spinach::Features::AdminUsers < Spinach::FeatureSteps
page
.
should
have_content
'Account'
page
.
should
have_content
'Personal projects limit'
end
step
'user "Pete" with ssh keys'
do
user
=
create
(
:user
,
name:
'Pete'
)
create
(
:key
,
user:
user
,
title:
"ssh-rsa Key1"
,
key:
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC4FIEBXGi4bPU8kzxMefudPIJ08/gNprdNTaO9BR/ndy3+58s2HCTw2xCHcsuBmq+TsAqgEidVq4skpqoTMB+Uot5Uzp9z4764rc48dZiI661izoREoKnuRQSsRqUTHg5wrLzwxlQbl1MVfRWQpqiz/5KjBC7yLEb9AbusjnWBk8wvC1bQPQ1uLAauEA7d836tgaIsym9BrLsMVnR4P1boWD3Xp1B1T/ImJwAGHvRmP/ycIqmKdSpMdJXwxcb40efWVj0Ibbe7ii9eeoLdHACqevUZi6fwfbymdow+FeqlkPoHyGg3Cu4vD/D8+8cRc7mE/zGCWcQ15Var83Tczour Key1"
)
create
(
:key
,
user:
user
,
title:
"ssh-rsa Key2"
,
key:
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDQSTWXhJAX/He+nG78MiRRRn7m0Pb0XbcgTxE0etArgoFoh9WtvDf36HG6tOSg/0UUNcp0dICsNAmhBKdncp6cIyPaXJTURPRAGvhI0/VDk4bi27bRnccGbJ/hDaUxZMLhhrzY0r22mjVf8PF6dvv5QUIQVm1/LeaWYsHHvLgiIjwrXirUZPnFrZw6VLREoBKG8uWvfSXw1L5eapmstqfsME8099oi+vWLR8MgEysZQmD28M73fgW4zek6LDQzKQyJx9nB+hJkKUDvcuziZjGmRFlNgSA2mguERwL1OXonD8WYUrBDGKroIvBT39zS5d9tQDnidEJZ9Y8gv5ViYP7x Key2"
)
end
step
'click on user "Pete"'
do
click_link
'Pete'
end
step
'I should see key list'
do
page
.
should
have_content
'ssh-rsa Key2'
page
.
should
have_content
'ssh-rsa Key1'
end
step
'I click on the key title'
do
click_link
'ssh-rsa Key2'
end
step
'I should see key details'
do
page
.
should
have_content
'ssh-rsa Key2'
page
.
should
have_content
'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDQSTWXhJAX/He+nG78MiRRRn7m0Pb0XbcgTxE0etArgoFoh9WtvDf36HG6tOSg/0UUNcp0dICsNAmhBKdncp6cIyPaXJTURPRAGvhI0/VDk4bi27bRnccGbJ/hDaUxZMLhhrzY0r22mjVf8PF6dvv5QUIQVm1/LeaWYsHHvLgiIjwrXirUZPnFrZw6VLREoBKG8uWvfSXw1L5eapmstqfsME8099oi+vWLR8MgEysZQmD28M73fgW4zek6LDQzKQyJx9nB+hJkKUDvcuziZjGmRFlNgSA2mguERwL1OXonD8WYUrBDGKroIvBT39zS5d9tQDnidEJZ9Y8gv5ViYP7x Key2'
end
step
'I click on remove key'
do
click_link
'Remove'
end
step
'I should see the key removed'
do
page
.
should_not
have_content
'ssh-rsa Key2'
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