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
aca6d367
Commit
aca6d367
authored
Jun 19, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add tests for admin managing user identities
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
d059c69d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
1 deletion
+54
-1
features/admin/users.feature
features/admin/users.feature
+18
-1
features/steps/admin/users.rb
features/steps/admin/users.rb
+36
-0
No files found.
features/admin/users.feature
View file @
aca6d367
...
...
@@ -28,7 +28,7 @@ Feature: Admin Users
When
I submit modified user
Then
I see user attributes changed
@javascript
@javascript
Scenario
:
Remove users secondary email
Given
I visit admin users page
And
I view the user with secondary email
...
...
@@ -45,3 +45,20 @@ Feature: Admin Users
Then
I should see key details
And
I click on remove key
Then
I should see the key removed
Scenario
:
Show user identities
Given
user
"Pete"
with twitter account
And
I visit
"Pete"
identities page in admin
Then
I should see twitter details
Scenario
:
Update user identities
Given
user
"Pete"
with twitter account
And
I visit
"Pete"
identities page in admin
And
I modify twitter identity
Then
I should see twitter details updated
Scenario
:
Remove user identities
Given
user
"Pete"
with twitter account
And
I visit
"Pete"
identities page in admin
And
I remove twitter identity
Then
I should not see twitter details
features/steps/admin/users.rb
View file @
aca6d367
...
...
@@ -114,4 +114,40 @@ class Spinach::Features::AdminUsers < Spinach::FeatureSteps
step
'I should see the key removed'
do
expect
(
page
).
not_to
have_content
'ssh-rsa Key2'
end
step
'user "Pete" with twitter account'
do
@user
=
create
(
:user
,
name:
'Pete'
)
@user
.
identities
.
create!
(
extern_uid:
'123456'
,
provider:
'twitter'
)
end
step
'I visit "Pete" identities page in admin'
do
visit
admin_user_identities_path
(
@user
)
end
step
'I should see twitter details'
do
expect
(
page
).
to
have_content
'Identities for Pete'
expect
(
page
).
to
have_content
'twitter'
end
step
'I modify twitter identity'
do
click_link
'Edit'
fill_in
'identity_extern_uid'
,
with:
'654321'
fill_in
'identity_provider'
,
with:
'twitter_updated'
click_button
'Save changes'
end
step
'I should see twitter details updated'
do
expect
(
page
).
to
have_content
'Identities for Pete'
expect
(
page
).
to
have_content
'twitter_updated'
expect
(
page
).
to
have_content
'654321'
end
step
'I remove twitter identity'
do
click_link
'Delete'
end
step
'I should not see twitter details'
do
expect
(
page
).
to
have_content
'Identities for Pete'
expect
(
page
).
to_not
have_content
'twitter'
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