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
Boxiang Sun
gitlab-ce
Commits
b13e1d79
Commit
b13e1d79
authored
Aug 12, 2016
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add small corrections to test coverage report badge
parent
0c81279e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
lib/gitlab/badge/coverage/template.rb
lib/gitlab/badge/coverage/template.rb
+2
-2
spec/lib/gitlab/badge/coverage/template_spec.rb
spec/lib/gitlab/badge/coverage/template_spec.rb
+3
-3
No files found.
lib/gitlab/badge/coverage/template.rb
View file @
b13e1d79
...
...
@@ -9,7 +9,7 @@ module Gitlab
class
Template
<
Badge
::
Template
STATUS_COLOR
=
{
good:
'#4c1'
,
acceptable:
'#
b0
c'
,
acceptable:
'#
a3c51
c'
,
medium:
'#dfb317'
,
low:
'#e05d44'
,
unknown:
'#9f9f9f'
...
...
@@ -33,7 +33,7 @@ module Gitlab
end
def
value_width
@status
?
3
2
:
58
@status
?
3
6
:
58
end
def
value_color
...
...
spec/lib/gitlab/badge/coverage/template_spec.rb
View file @
b13e1d79
...
...
@@ -37,7 +37,7 @@ describe Gitlab::Badge::Coverage::Template do
describe
'#value_width'
do
context
'when coverage is known'
do
it
'is narrower when coverage is known'
do
expect
(
template
.
value_width
).
to
eq
3
2
expect
(
template
.
value_width
).
to
eq
3
6
end
end
...
...
@@ -75,7 +75,7 @@ describe Gitlab::Badge::Coverage::Template do
end
it
'is green-orange'
do
expect
(
template
.
value_color
).
to
eq
'#
b0
c'
expect
(
template
.
value_color
).
to
eq
'#
a3c51
c'
end
end
...
...
@@ -113,7 +113,7 @@ describe Gitlab::Badge::Coverage::Template do
describe
'#width'
do
context
'when coverage is known'
do
it
'returns the key width plus value width'
do
expect
(
template
.
width
).
to
eq
9
4
expect
(
template
.
width
).
to
eq
9
8
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