BigW Consortium Gitlab
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
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
30f375cf
Commit
30f375cf
authored
Jul 20, 2016
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't show other actions of the same name
parent
f3d03af4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
1 deletion
+17
-1
build.rb
app/models/ci/build.rb
+1
-1
build_spec.rb
spec/models/build_spec.rb
+16
-0
No files found.
app/models/ci/build.rb
View file @
30f375cf
...
...
@@ -97,7 +97,7 @@ module Ci
end
def
other_actions
pipeline
.
manual_actions
.
where
.
not
(
id:
self
)
pipeline
.
manual_actions
.
where
.
not
(
name:
name
)
end
def
playable?
...
...
spec/models/build_spec.rb
View file @
30f375cf
...
...
@@ -808,6 +808,22 @@ describe Ci::Build, models: true do
it
'returns other actions'
do
is_expected
.
to
contain_exactly
(
other_build
)
end
context
'when build is retried'
do
let!
(
:new_build
)
{
Ci
::
Build
.
retry
(
build
)
}
it
'does not return any of them'
do
is_expected
.
not_to
include
(
build
,
new_build
)
end
end
context
'when other build is retried'
do
let!
(
:retried_build
)
{
Ci
::
Build
.
retry
(
other_build
)
}
it
'returns a retried build'
do
is_expected
.
to
contain_exactly
(
retried_build
)
end
end
end
describe
'#play'
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