Skip to content

Commit b13e1d7

Browse files
committed
Add small corrections to test coverage report badge
1 parent 0c81279 commit b13e1d7

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

lib/gitlab/badge/coverage/template.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ module Coverage
99
class Template < Badge::Template
1010
STATUS_COLOR = {
1111
good: '#4c1',
12-
acceptable: '#b0c',
12+
acceptable: '#a3c51c',
1313
medium: '#dfb317',
1414
low: '#e05d44',
1515
unknown: '#9f9f9f'
@@ -33,7 +33,7 @@ def key_width
3333
end
3434

3535
def value_width
36-
@status ? 32 : 58
36+
@status ? 36 : 58
3737
end
3838

3939
def value_color

spec/lib/gitlab/badge/coverage/template_spec.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
describe '#value_width' do
3838
context 'when coverage is known' do
3939
it 'is narrower when coverage is known' do
40-
expect(template.value_width).to eq 32
40+
expect(template.value_width).to eq 36
4141
end
4242
end
4343

@@ -75,7 +75,7 @@
7575
end
7676

7777
it 'is green-orange' do
78-
expect(template.value_color).to eq '#b0c'
78+
expect(template.value_color).to eq '#a3c51c'
7979
end
8080
end
8181

@@ -113,7 +113,7 @@
113113
describe '#width' do
114114
context 'when coverage is known' do
115115
it 'returns the key width plus value width' do
116-
expect(template.width).to eq 94
116+
expect(template.width).to eq 98
117117
end
118118
end
119119

0 commit comments

Comments
 (0)