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
ffca0da0
Commit
ffca0da0
authored
Dec 27, 2016
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Merge branch 'fix-latest-pipeine-ordering-again' into 'master'"
This reverts commit
a18ad6cf
.
parent
e8254c30
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
14 deletions
+1
-14
app/models/ci/pipeline.rb
app/models/ci/pipeline.rb
+1
-1
spec/models/ci/pipeline_spec.rb
spec/models/ci/pipeline_spec.rb
+0
-13
No files found.
app/models/ci/pipeline.rb
View file @
ffca0da0
...
...
@@ -102,7 +102,7 @@ module Ci
end
def
self
.
latest_successful_for
(
ref
)
success
.
latest
(
ref
).
order
(
id: :desc
).
first
success
.
latest
(
ref
).
first
end
def
self
.
truncate_sha
(
sha
)
...
...
spec/models/ci/pipeline_spec.rb
View file @
ffca0da0
...
...
@@ -462,19 +462,6 @@ 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