Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
e300e9d5
Commit
e300e9d5
authored
Sep 09, 2016
by
Stan Hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve PipelinesFinder spec so that it does not depend on hard-coded database IDs
Fixes failed builds such as
https://gitlab.com/gitlab-org/gitlab-ce/builds/3919501
parent
796bdf1d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
pipelines_finder_spec.rb
spec/finders/pipelines_finder_spec.rb
+3
-2
No files found.
spec/finders/pipelines_finder_spec.rb
View file @
e300e9d5
...
...
@@ -43,9 +43,10 @@ describe PipelinesFinder do
let
(
:params
)
{
{
scope:
'running'
}
}
it
'orders in descending order on ID'
do
create
(
:ci_pipeline
,
project:
project
,
ref:
'feature'
)
feature_pipeline
=
create
(
:ci_pipeline
,
project:
project
,
ref:
'feature'
)
expect
(
subject
.
map
(
&
:id
)).
to
eq
[
3
,
2
,
1
]
expected_ids
=
[
feature_pipeline
.
id
,
branch_pipeline
.
id
,
tag_pipeline
.
id
].
sort
.
reverse
expect
(
subject
.
map
(
&
:id
)).
to
eq
expected_ids
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