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
7f6e0c84
Commit
7f6e0c84
authored
Jan 22, 2019
by
Vladimir Shushlin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Treat "" as nil for external commit status description
parent
ffc9fe49
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
lib/gitlab/ci/status/external/common.rb
lib/gitlab/ci/status/external/common.rb
+1
-1
spec/lib/gitlab/ci/status/external/common_spec.rb
spec/lib/gitlab/ci/status/external/common_spec.rb
+9
-1
No files found.
lib/gitlab/ci/status/external/common.rb
View file @
7f6e0c84
...
...
@@ -6,7 +6,7 @@ module Gitlab
module
External
module
Common
def
label
subject
.
description
||
super
subject
.
description
.
presence
||
super
end
def
has_details?
...
...
spec/lib/gitlab/ci/status/external/common_spec.rb
View file @
7f6e0c84
...
...
@@ -21,13 +21,21 @@ describe Gitlab::Ci::Status::External::Common do
expect
(
subject
.
label
).
to
eq
external_description
end
context
'when description is n
ot set
'
do
context
'when description is n
il
'
do
let
(
:external_description
)
{
nil
}
it
'uses core status label'
do
expect
(
subject
.
label
).
to
eq
(
'passed'
)
end
end
context
'when description is empty string'
do
let
(
:external_description
)
{
''
}
it
'uses core status label'
do
expect
(
subject
.
label
).
to
eq
(
'passed'
)
end
end
end
describe
'#has_action?'
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