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
e60bf0d6
Commit
e60bf0d6
authored
Dec 26, 2016
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a test for latest_successful_for
parent
655289dd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
0 deletions
+17
-0
changelogs/unreleased/fix-latest-pipeine-ordering.yml
changelogs/unreleased/fix-latest-pipeine-ordering.yml
+4
-0
spec/models/ci/pipeline_spec.rb
spec/models/ci/pipeline_spec.rb
+13
-0
No files found.
changelogs/unreleased/fix-latest-pipeine-ordering.yml
0 → 100644
View file @
e60bf0d6
---
title
:
Fix finding the latest pipeline
merge_request
:
8301
author
:
spec/models/ci/pipeline_spec.rb
View file @
e60bf0d6
...
...
@@ -464,6 +464,19 @@ describe Ci::Pipeline, models: true do
end
end
describe
'.latest_successful_for'
do
include_context
'with some outdated pipelines'
let!
(
:latest_successful_pipeline
)
do
create_pipeline
(
:success
,
'ref'
,
'D'
)
end
it
'returns the latest successful pipeline'
do
expect
(
described_class
.
latest_successful_for
(
'ref'
)).
to
eq
(
latest_successful_pipeline
)
end
end
describe
'#status'
do
let!
(
:build
)
{
create
(
:ci_build
,
:created
,
pipeline:
pipeline
,
name:
'test'
)
}
...
...
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