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
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'
require
'spec_helper'
feature
'Admin::HookLogs'
do
feature
'Admin::HookLogs'
do
let
(
:project
)
{
create
(
:project
)
}
let
(
:project
)
{
create
(
:
empty_
project
)
}
let
(
:system_hook
)
{
create
(
:system_hook
)
}
let
(
:system_hook
)
{
create
(
:system_hook
)
}
let
(
:hook_log
)
{
create
(
:web_hook_log
,
web_hook:
system_hook
,
internal_error_message:
'some error'
)
}
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'
...
@@ -2,7 +2,7 @@ require 'spec_helper'
describe
'Admin::Hooks'
do
describe
'Admin::Hooks'
do
before
do
before
do
@project
=
create
(
:project
)
@project
=
create
(
:
empty_
project
)
sign_in
(
create
(
:admin
))
sign_in
(
create
(
:admin
))
@system_hook
=
create
(
:system_hook
)
@system_hook
=
create
(
:system_hook
)
...
...
spec/features/admin/admin_projects_spec.rb
View file @
75319d97
...
@@ -4,17 +4,18 @@ describe "Admin::Projects" do
...
@@ -4,17 +4,18 @@ describe "Admin::Projects" do
include
Select2Helper
include
Select2Helper
let
(
:user
)
{
create
:user
}
let
(
:user
)
{
create
:user
}
let
!
(
:project
)
{
create
(
:
project
)
}
let
(
:project
)
{
create
(
:empty_
project
)
}
let
!
(
:current_user
)
{
create
(
:admin
)
}
let
(
:current_user
)
{
create
(
:admin
)
}
before
do
before
do
sign_in
(
current_user
)
sign_in
(
current_user
)
end
end
describe
"GET /admin/projects"
do
describe
"GET /admin/projects"
do
let!
(
:archived_project
)
{
create
:project
,
:public
,
:archived
}
let!
(
:archived_project
)
{
create
:
empty_
project
,
:public
,
:archived
}
before
do
before
do
expect
(
project
).
to
be_persisted
visit
admin_projects_path
visit
admin_projects_path
end
end
...
@@ -39,15 +40,14 @@ describe "Admin::Projects" do
...
@@ -39,15 +40,14 @@ describe "Admin::Projects" do
describe
"GET /admin/projects/:namespace_id/:id"
do
describe
"GET /admin/projects/:namespace_id/:id"
do
before
do
before
do
visit
admin_projects_path
expect
(
project
).
to
be_persisted
click_link
"
#{
project
.
name
}
"
end
it
do
visit
admin_projects_path
expect
(
current_path
).
to
eq
admin_project_path
(
project
)
click_link
project
.
name
end
end
it
"has project info"
do
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
.
path
)
expect
(
page
).
to
have_content
(
project
.
name
)
expect
(
page
).
to
have_content
(
project
.
name
)
expect
(
page
).
to
have_content
(
project
.
name_with_namespace
)
expect
(
page
).
to
have_content
(
project
.
name_with_namespace
)
...
@@ -56,6 +56,9 @@ describe "Admin::Projects" do
...
@@ -56,6 +56,9 @@ describe "Admin::Projects" do
end
end
describe
'transfer project'
do
describe
'transfer project'
do
# The gitlab-shell transfer will fail for a project without a repository
let
(
:project
)
{
create
(
:project
,
:repository
)
}
before
do
before
do
create
(
:group
,
name:
'Web'
)
create
(
:group
,
name:
'Web'
)
...
...
spec/features/admin/admin_users_spec.rb
View file @
75319d97
...
@@ -257,7 +257,7 @@ describe "Admin::Users" do
...
@@ -257,7 +257,7 @@ describe "Admin::Users" do
describe
"GET /admin/users/:id/projects"
do
describe
"GET /admin/users/:id/projects"
do
let
(
:group
)
{
create
(
:group
)
}
let
(
:group
)
{
create
(
:group
)
}
let!
(
:project
)
{
create
(
:project
,
group:
group
)
}
let!
(
:project
)
{
create
(
:
empty_
project
,
group:
group
)
}
before
do
before
do
group
.
add_developer
(
user
)
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