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
Hide 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
...
@@ -2,6 +2,9 @@ module Gitlab
module
Ci
module
Ci
module
Status
module
Status
module
Build
module
Build
##
# Extended status for playable manual actions.
#
class
Action
<
Status
::
Extended
class
Action
<
Status
::
Extended
def
label
def
label
if
has_action?
if
has_action?
...
@@ -12,7 +15,7 @@ module Gitlab
...
@@ -12,7 +15,7 @@ module Gitlab
end
end
def
self
.
matches?
(
build
,
user
)
def
self
.
matches?
(
build
,
user
)
build
.
action
?
build
.
playable
?
end
end
end
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
...
@@ -37,16 +37,16 @@ describe Gitlab::Ci::Status::Build::Action do
describe
'.matches?'
do
describe
'.matches?'
do
subject
{
described_class
.
matches?
(
build
,
user
)
}
subject
{
described_class
.
matches?
(
build
,
user
)
}
context
'when build is
an
action'
do
context
'when build is
playable
action'
do
let
(
:build
)
{
create
(
:ci_build
,
:
manual
)
}
let
(
:build
)
{
create
(
:ci_build
,
:
playable
)
}
it
'is a correct match'
do
it
'is a correct match'
do
expect
(
subject
).
to
be
true
expect
(
subject
).
to
be
true
end
end
end
end
context
'when build is not
manual
'
do
context
'when build is not
playable action
'
do
let
(
:build
)
{
create
(
:ci_build
)
}
let
(
:build
)
{
create
(
:ci_build
,
:non_playable
)
}
it
'does not match'
do
it
'does not match'
do
expect
(
subject
).
to
be
false
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