Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
3193300d2793
Commit
8877f2e8
authored
Jul 19, 2017
by
Z.J. van de Weg
Browse files
Reword success to passing for pipeline badges
parent
c77502c379c7
Changes
5
Hide whitespace changes
Inline
Side-by-side
changelogs/unreleased/zj-pipeline-badge-improvements.yml
0 → 100644
View file @
3193300d
---
title
:
Update build badges to be pipeline badges and display passing instead of success
merge_request
:
author
:
features/steps/project/badges/build.rb
View file @
3193300d
...
...
@@ -9,7 +9,7 @@ class Spinach::Features::ProjectBadgesBuild < Spinach::FeatureSteps
end
step
'I should see a build success badge'
do
expect_badge
(
'
success
'
)
expect_badge
(
'
passed
'
)
end
step
'I should see a build failed badge'
do
...
...
lib/gitlab/badge/pipeline/template.rb
View file @
3193300d
...
...
@@ -7,6 +7,7 @@ module Pipeline
# Template object will be passed to badge.svg.erb template.
#
class
Template
<
Badge
::
Template
STATUS_RENAME
=
{
'success'
=>
'passed'
}.
freeze
STATUS_COLOR
=
{
success:
'#4c1'
,
failed:
'#e05d44'
,
...
...
@@ -27,7 +28,7 @@ def key_text
end
def
value_text
@status
.
to_s
STATUS_RENAME
[
@status
.
to_s
]
||
@status
.
to_s
end
def
key_width
...
...
spec/features/projects/badges/pipeline_badge_spec.rb
0 → 100644
View file @
3193300d
require
'spec_helper'
feature
'pipeline badge'
do
let
(
:project
)
{
create
(
:project
,
:repository
,
:public
)
}
# this can't be tested in the controller, as it bypasses the rails router
# and constructs a route based on the controller being tested
# Keep around until 10.0, see gitlab-org/gitlab-ce#35307
scenario
'user request the deprecated build status badge'
do
visit
build_project_badges_path
(
project
,
ref:
project
.
default_branch
,
format: :svg
)
expect
(
page
.
status_code
).
to
eq
(
200
)
end
end
spec/lib/gitlab/badge/pipeline/template_spec.rb
View file @
3193300d
...
...
@@ -12,7 +12,7 @@
describe
'#value_text'
do
it
'is status value'
do
expect
(
template
.
value_text
).
to
eq
'
success
'
expect
(
template
.
value_text
).
to
eq
'
passed
'
end
end
...
...
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