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
Boxiang Sun
gitlab-ce
Commits
d9ece71e
Commit
d9ece71e
authored
Oct 14, 2015
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix specs
parent
4d69c6a3
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
23 additions
and
23 deletions
+23
-23
app/controllers/projects/builds_controller.rb
app/controllers/projects/builds_controller.rb
+6
-6
app/models/ci/runner.rb
app/models/ci/runner.rb
+1
-1
features/steps/project/commits/commits.rb
features/steps/project/commits/commits.rb
+1
-1
spec/features/builds_spec.rb
spec/features/builds_spec.rb
+14
-14
spec/models/ci/runner_spec.rb
spec/models/ci/runner_spec.rb
+1
-1
No files found.
app/controllers/projects/builds_controller.rb
View file @
d9ece71e
app/models/ci/runner.rb
View file @
d9ece71e
...
@@ -78,7 +78,7 @@ module Ci
...
@@ -78,7 +78,7 @@ module Ci
end
end
def
short_sha
def
short_sha
token
[
0
...
8
]
token
[
0
...
8
]
if
token
end
end
end
end
end
end
features/steps/project/commits/commits.rb
View file @
d9ece71e
...
@@ -113,7 +113,7 @@ class Spinach::Features::ProjectCommits < Spinach::FeatureSteps
...
@@ -113,7 +113,7 @@ class Spinach::Features::ProjectCommits < Spinach::FeatureSteps
end
end
step
'I click status link'
do
step
'I click status link'
do
click_link
"Builds"
find
(
'.commit-ci-menu'
).
click_link
"Builds"
end
end
step
'I see builds list'
do
step
'I see builds list'
do
...
...
spec/features/builds_spec.rb
View file @
d9ece71e
...
@@ -10,40 +10,40 @@ describe "Builds" do
...
@@ -10,40 +10,40 @@ describe "Builds" do
end
end
describe
"GET /:project/builds"
do
describe
"GET /:project/builds"
do
context
"
All builds
"
do
context
"
Running scope
"
do
before
do
before
do
@build
.
success
@build
.
run!
visit
namespace_project_builds_path
(
@gl_project
.
namespace
,
@gl_project
)
visit
namespace_project_builds_path
(
@gl_project
.
namespace
,
@gl_project
)
end
end
it
{
expect
(
page
).
to
have_content
'All builds'
}
it
{
expect
(
page
).
to
have_content
'Running'
}
it
{
expect
(
page
).
to
have_content
'Cancel all'
}
it
{
expect
(
page
).
to
have_content
@build
.
short_sha
}
it
{
expect
(
page
).
to
have_content
@build
.
short_sha
}
it
{
expect
(
page
).
to
have_content
@build
.
ref
}
it
{
expect
(
page
).
to
have_content
@build
.
ref
}
it
{
expect
(
page
).
to
have_content
@build
.
name
}
it
{
expect
(
page
).
to
have_content
@build
.
name
}
it
{
expect
(
page
).
to_not
have_content
'Cancel all'
}
end
end
context
"
Pending
scope"
do
context
"
Finished
scope"
do
before
do
before
do
@build
.
success
@build
.
run!
visit
namespace_project_builds_path
(
@gl_project
.
namespace
,
@gl_project
,
scope: :
pending
)
visit
namespace_project_builds_path
(
@gl_project
.
namespace
,
@gl_project
,
scope: :
finished
)
end
end
it
{
expect
(
page
).
to
have_content
'No builds to show'
}
it
{
expect
(
page
).
to
have_content
'No builds to show'
}
it
{
expect
(
page
).
to
_not
have_content
'Cancel all'
}
it
{
expect
(
page
).
to
have_content
'Cancel all'
}
end
end
context
"
Running scope
"
do
context
"
All builds
"
do
before
do
before
do
@
build
.
run!
@
gl_project
.
ci_builds
.
running_or_pending
.
each
(
&
:success
)
visit
namespace_project_builds_path
(
@gl_project
.
namespace
,
@gl_project
,
scope: :
running
)
visit
namespace_project_builds_path
(
@gl_project
.
namespace
,
@gl_project
,
scope: :
all
)
end
end
it
{
expect
(
page
).
to
have_content
'Running'
}
it
{
expect
(
page
).
to
have_content
'All'
}
it
{
expect
(
page
).
to
have_content
'Cancel all'
}
it
{
expect
(
page
).
to
have_content
@build
.
short_sha
}
it
{
expect
(
page
).
to
have_content
@build
.
short_sha
}
it
{
expect
(
page
).
to
have_content
@build
.
ref
}
it
{
expect
(
page
).
to
have_content
@build
.
ref
}
it
{
expect
(
page
).
to
have_content
@build
.
name
}
it
{
expect
(
page
).
to
have_content
@build
.
name
}
it
{
expect
(
page
).
to_not
have_content
'Cancel all'
}
end
end
end
end
...
@@ -53,7 +53,7 @@ describe "Builds" do
...
@@ -53,7 +53,7 @@ describe "Builds" do
visit
cancel_namespace_project_build_path
(
@gl_project
.
namespace
,
@gl_project
,
@build
)
visit
cancel_namespace_project_build_path
(
@gl_project
.
namespace
,
@gl_project
,
@build
)
end
end
it
{
expect
(
page
).
to
have_content
'All
builds
'
}
it
{
expect
(
page
).
to
have_content
'All'
}
it
{
expect
(
page
).
to
have_content
'canceled'
}
it
{
expect
(
page
).
to
have_content
'canceled'
}
it
{
expect
(
page
).
to_not
have_content
'Cancel all'
}
it
{
expect
(
page
).
to_not
have_content
'Cancel all'
}
end
end
...
...
spec/models/ci/runner_spec.rb
View file @
d9ece71e
...
@@ -32,7 +32,7 @@ describe Ci::Runner do
...
@@ -32,7 +32,7 @@ describe Ci::Runner do
end
end
it
'should return the token if the description is an empty string'
do
it
'should return the token if the description is an empty string'
do
runner
=
FactoryGirl
.
build
(
:ci_runner
,
description:
''
)
runner
=
FactoryGirl
.
build
(
:ci_runner
,
description:
''
,
token:
'token'
)
expect
(
runner
.
display_name
).
to
eq
runner
.
token
expect
(
runner
.
display_name
).
to
eq
runner
.
token
end
end
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