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
c8e20d6f
Commit
c8e20d6f
authored
Jun 29, 2018
by
Matija Čupić
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check for correct builds collection
parent
7e5bbc0d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
spec/controllers/projects/jobs_controller_spec.rb
spec/controllers/projects/jobs_controller_spec.rb
+9
-0
No files found.
spec/controllers/projects/jobs_controller_spec.rb
View file @
c8e20d6f
...
...
@@ -102,6 +102,8 @@ describe Projects::JobsController, :clean_gitlab_redis_shared_state do
describe
'GET show'
do
let!
(
:job
)
{
create
(
:ci_build
,
:failed
,
pipeline:
pipeline
)
}
let!
(
:second_job
)
{
create
(
:ci_build
,
:failed
,
pipeline:
pipeline
)
}
let!
(
:third_job
)
{
create
(
:ci_build
,
:failed
)
}
context
'when requesting HTML'
do
context
'when job exists'
do
...
...
@@ -113,6 +115,13 @@ describe Projects::JobsController, :clean_gitlab_redis_shared_state do
expect
(
response
).
to
have_gitlab_http_status
(
:ok
)
expect
(
assigns
(
:build
).
id
).
to
eq
(
job
.
id
)
end
it
'has the correct build collection'
do
builds
=
assigns
(
:builds
).
map
(
&
:id
)
expect
(
builds
).
to
include
(
job
.
id
,
second_job
.
id
)
expect
(
builds
).
not_to
include
(
third_job
.
id
)
end
end
context
'when job does not exist'
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