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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
75319d97
Commit
75319d97
authored
Jul 21, 2017
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use `empty_project` where possible in spec/features/admin
parent
c26f4a07
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
11 deletions
+14
-11
spec/features/admin/admin_hook_logs_spec.rb
spec/features/admin/admin_hook_logs_spec.rb
+1
-1
spec/features/admin/admin_hooks_spec.rb
spec/features/admin/admin_hooks_spec.rb
+1
-1
spec/features/admin/admin_projects_spec.rb
spec/features/admin/admin_projects_spec.rb
+11
-8
spec/features/admin/admin_users_spec.rb
spec/features/admin/admin_users_spec.rb
+1
-1
No files found.
spec/features/admin/admin_hook_logs_spec.rb
View file @
75319d97
require
'spec_helper'
feature
'Admin::HookLogs'
do
let
(
:project
)
{
create
(
:project
)
}
let
(
:project
)
{
create
(
:
empty_
project
)
}
let
(
:system_hook
)
{
create
(
:system_hook
)
}
let
(
:hook_log
)
{
create
(
:web_hook_log
,
web_hook:
system_hook
,
internal_error_message:
'some error'
)
}
...
...
spec/features/admin/admin_hooks_spec.rb
View file @
75319d97
...
...
@@ -2,7 +2,7 @@ require 'spec_helper'
describe
'Admin::Hooks'
do
before
do
@project
=
create
(
:project
)
@project
=
create
(
:
empty_
project
)
sign_in
(
create
(
:admin
))
@system_hook
=
create
(
:system_hook
)
...
...
spec/features/admin/admin_projects_spec.rb
View file @
75319d97
...
...
@@ -4,17 +4,18 @@ describe "Admin::Projects" do
include
Select2Helper
let
(
:user
)
{
create
:user
}
let
!
(
:project
)
{
create
(
:
project
)
}
let
!
(
:current_user
)
{
create
(
:admin
)
}
let
(
:project
)
{
create
(
:empty_
project
)
}
let
(
:current_user
)
{
create
(
:admin
)
}
before
do
sign_in
(
current_user
)
end
describe
"GET /admin/projects"
do
let!
(
:archived_project
)
{
create
:project
,
:public
,
:archived
}
let!
(
:archived_project
)
{
create
:
empty_
project
,
:public
,
:archived
}
before
do
expect
(
project
).
to
be_persisted
visit
admin_projects_path
end
...
...
@@ -39,15 +40,14 @@ describe "Admin::Projects" do
describe
"GET /admin/projects/:namespace_id/:id"
do
before
do
visit
admin_projects_path
click_link
"
#{
project
.
name
}
"
end
expect
(
project
).
to
be_persisted
it
do
expect
(
current_path
).
to
eq
admin_project_path
(
project
)
visit
admin_projects_path
click_link
project
.
name
end
it
"has project info"
do
expect
(
current_path
).
to
eq
admin_project_path
(
project
)
expect
(
page
).
to
have_content
(
project
.
path
)
expect
(
page
).
to
have_content
(
project
.
name
)
expect
(
page
).
to
have_content
(
project
.
name_with_namespace
)
...
...
@@ -56,6 +56,9 @@ describe "Admin::Projects" do
end
describe
'transfer project'
do
# The gitlab-shell transfer will fail for a project without a repository
let
(
:project
)
{
create
(
:project
,
:repository
)
}
before
do
create
(
:group
,
name:
'Web'
)
...
...
spec/features/admin/admin_users_spec.rb
View file @
75319d97
...
...
@@ -257,7 +257,7 @@ describe "Admin::Users" do
describe
"GET /admin/users/:id/projects"
do
let
(
:group
)
{
create
(
:group
)
}
let!
(
:project
)
{
create
(
:project
,
group:
group
)
}
let!
(
:project
)
{
create
(
:
empty_
project
,
group:
group
)
}
before
do
group
.
add_developer
(
user
)
...
...
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