Commit 273dbb3e authored by drew's avatar drew Committed by drew cimino

Remove an unecessary double and clean up some syntax

parent 0390115d
...@@ -51,10 +51,8 @@ RSpec.describe Gitlab::Badge::Coverage::Report do ...@@ -51,10 +51,8 @@ RSpec.describe Gitlab::Badge::Coverage::Report do
end end
context 'with no job specified' do context 'with no job specified' do
let(:pipeline) { double('pipeline', coverage: 1) }
it 'returns the pipeline coverage value' do it 'returns the pipeline coverage value' do
expect(badge.status).to eq(1.00) expect(badge.status).to eq(50.00)
end end
end end
...@@ -62,14 +60,14 @@ RSpec.describe Gitlab::Badge::Coverage::Report do ...@@ -62,14 +60,14 @@ RSpec.describe Gitlab::Badge::Coverage::Report do
let(:job_name) { 'incorrect name' } let(:job_name) { 'incorrect name' }
it 'returns nil' do it 'returns nil' do
expect(badge.status).to eq(nil) expect(badge.status).to be_nil
end end
end end
context 'with a matching job name specified' do context 'with a matching job name specified' do
let(:job_name) { 'first' } let(:job_name) { 'first' }
it 'returns nil' do it 'returns the pipeline coverage value' do
expect(badge.status).to eq(40.00) expect(badge.status).to eq(40.00)
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment