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
Jérome Perrin
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
Show 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
...
@@ -9,7 +9,7 @@ module Gitlab
class
Template
<
Badge
::
Template
class
Template
<
Badge
::
Template
STATUS_COLOR
=
{
STATUS_COLOR
=
{
good:
'#4c1'
,
good:
'#4c1'
,
acceptable:
'#
b0
c'
,
acceptable:
'#
a3c51
c'
,
medium:
'#dfb317'
,
medium:
'#dfb317'
,
low:
'#e05d44'
,
low:
'#e05d44'
,
unknown:
'#9f9f9f'
unknown:
'#9f9f9f'
...
@@ -33,7 +33,7 @@ module Gitlab
...
@@ -33,7 +33,7 @@ module Gitlab
end
end
def
value_width
def
value_width
@status
?
3
2
:
58
@status
?
3
6
:
58
end
end
def
value_color
def
value_color
...
...
spec/lib/gitlab/badge/coverage/template_spec.rb
View file @
b13e1d79
...
@@ -37,7 +37,7 @@ describe Gitlab::Badge::Coverage::Template do
...
@@ -37,7 +37,7 @@ describe Gitlab::Badge::Coverage::Template do
describe
'#value_width'
do
describe
'#value_width'
do
context
'when coverage is known'
do
context
'when coverage is known'
do
it
'is narrower 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
end
end
...
@@ -75,7 +75,7 @@ describe Gitlab::Badge::Coverage::Template do
...
@@ -75,7 +75,7 @@ describe Gitlab::Badge::Coverage::Template do
end
end
it
'is green-orange'
do
it
'is green-orange'
do
expect
(
template
.
value_color
).
to
eq
'#
b0
c'
expect
(
template
.
value_color
).
to
eq
'#
a3c51
c'
end
end
end
end
...
@@ -113,7 +113,7 @@ describe Gitlab::Badge::Coverage::Template do
...
@@ -113,7 +113,7 @@ describe Gitlab::Badge::Coverage::Template do
describe
'#width'
do
describe
'#width'
do
context
'when coverage is known'
do
context
'when coverage is known'
do
it
'returns the key width plus value width'
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
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