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
Tatuya Kamada
gitlab-ce
Commits
74c817c7
Commit
74c817c7
authored
Jan 02, 2017
by
Semyon Pupkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tiny refactoring example in admin users feature spec
parent
1591c90f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
spec/features/admin/admin_users_spec.rb
spec/features/admin/admin_users_spec.rb
+9
-9
No files found.
spec/features/admin/admin_users_spec.rb
View file @
74c817c7
...
@@ -243,30 +243,30 @@ describe "Admin::Users", feature: true do
...
@@ -243,30 +243,30 @@ describe "Admin::Users", feature: true do
end
end
describe
"GET /admin/users/:id/projects"
do
describe
"GET /admin/users/:id/projects"
do
let
(
:group
)
{
create
(
:group
)
}
let!
(
:project
)
{
create
(
:project
,
group:
group
)
}
before
do
before
do
@group
=
create
(
:group
)
group
.
add_developer
(
user
)
@project
=
create
(
:project
,
group:
@group
)
@simple_user
=
create
(
:user
)
@group
.
add_developer
(
@simple_user
)
visit
projects_admin_user_path
(
@simple_
user
)
visit
projects_admin_user_path
(
user
)
end
end
it
"lists group projects"
do
it
"lists group projects"
do
within
(
:css
,
'.append-bottom-default + .panel'
)
do
within
(
:css
,
'.append-bottom-default + .panel'
)
do
expect
(
page
).
to
have_content
'Group projects'
expect
(
page
).
to
have_content
'Group projects'
expect
(
page
).
to
have_link
@group
.
name
,
admin_group_path
(
@
group
)
expect
(
page
).
to
have_link
group
.
name
,
admin_group_path
(
group
)
end
end
end
end
it
'allows navigation to the group details'
do
it
'allows navigation to the group details'
do
within
(
:css
,
'.append-bottom-default + .panel'
)
do
within
(
:css
,
'.append-bottom-default + .panel'
)
do
click_link
@
group
.
name
click_link
group
.
name
end
end
within
(
:css
,
'h3.page-title'
)
do
within
(
:css
,
'h3.page-title'
)
do
expect
(
page
).
to
have_content
"Group:
#{
@
group
.
name
}
"
expect
(
page
).
to
have_content
"Group:
#{
group
.
name
}
"
end
end
expect
(
page
).
to
have_content
@
project
.
name
expect
(
page
).
to
have_content
project
.
name
end
end
it
'shows the group access level'
do
it
'shows the group access level'
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