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
Jérome Perrin
gitlab-ce
Commits
045dad3c
Commit
045dad3c
authored
Jun 17, 2016
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test for enabling/disabling runners from admin runner page
parent
dbd534a8
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
2 deletions
+36
-2
app/views/admin/runners/show.html.haml
app/views/admin/runners/show.html.haml
+2
-2
spec/features/admin/admin_runners_spec.rb
spec/features/admin/admin_runners_spec.rb
+34
-0
No files found.
app/views/admin/runners/show.html.haml
View file @
045dad3c
...
...
@@ -28,7 +28,7 @@
.col-md-6
%h4
Restrict projects for this runner
-
if
@runner
.
projects
.
any?
%table
.table
%table
.table
.assigned-projects
%thead
%tr
%th
Assigned projects
...
...
@@ -44,7 +44,7 @@
.pull-right
=
link_to
'Disable'
,
[
:admin
,
project
.
namespace
.
becomes
(
Namespace
),
project
,
runner_project
],
method: :delete
,
class:
'btn btn-danger btn-xs'
%table
.table
%table
.table
.unassigned-projects
%thead
%tr
%th
Project
...
...
spec/features/admin/admin_runners_spec.rb
View file @
045dad3c
...
...
@@ -60,6 +60,40 @@ describe "Admin Runners" do
it
{
expect
(
page
).
to
have_content
(
@project1
.
name_with_namespace
)
}
it
{
expect
(
page
).
not_to
have_content
(
@project2
.
name_with_namespace
)
}
end
describe
'enable/create'
do
before
do
@project1
.
runners
<<
runner
visit
admin_runner_path
(
runner
)
end
it
'enables specific runner for project'
do
within
'.unassigned-projects'
do
click_on
'Enable'
end
assigned_project
=
page
.
find
(
'.assigned-projects'
)
expect
(
assigned_project
).
to
have_content
(
@project2
.
path
)
end
end
describe
'disable/destroy'
do
before
do
@project1
.
runners
<<
runner
visit
admin_runner_path
(
runner
)
end
it
'enables specific runner for project'
do
within
'.assigned-projects'
do
click_on
'Disable'
end
new_runner_project
=
page
.
find
(
'.unassigned-projects'
)
expect
(
new_runner_project
).
to
have_content
(
@project1
.
path
)
end
end
end
describe
'runners registration token'
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