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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
c0e9a46d
Commit
c0e9a46d
authored
Jan 16, 2018
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix running manual action tooltip
parent
7951acfd
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
+8
-5
lib/gitlab/ci/status/build/action.rb
lib/gitlab/ci/status/build/action.rb
+4
-1
spec/lib/gitlab/ci/status/build/action_spec.rb
spec/lib/gitlab/ci/status/build/action_spec.rb
+4
-4
No files found.
lib/gitlab/ci/status/build/action.rb
View file @
c0e9a46d
...
...
@@ -2,6 +2,9 @@ module Gitlab
module
Ci
module
Status
module
Build
##
# Extended status for playable manual actions.
#
class
Action
<
Status
::
Extended
def
label
if
has_action?
...
...
@@ -12,7 +15,7 @@ module Gitlab
end
def
self
.
matches?
(
build
,
user
)
build
.
action
?
build
.
playable
?
end
end
end
...
...
spec/lib/gitlab/ci/status/build/action_spec.rb
View file @
c0e9a46d
...
...
@@ -37,16 +37,16 @@ describe Gitlab::Ci::Status::Build::Action do
describe
'.matches?'
do
subject
{
described_class
.
matches?
(
build
,
user
)
}
context
'when build is
an
action'
do
let
(
:build
)
{
create
(
:ci_build
,
:
manual
)
}
context
'when build is
playable
action'
do
let
(
:build
)
{
create
(
:ci_build
,
:
playable
)
}
it
'is a correct match'
do
expect
(
subject
).
to
be
true
end
end
context
'when build is not
manual
'
do
let
(
:build
)
{
create
(
:ci_build
)
}
context
'when build is not
playable action
'
do
let
(
:build
)
{
create
(
:ci_build
,
:non_playable
)
}
it
'does not match'
do
expect
(
subject
).
to
be
false
...
...
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