Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/serializers/ci/pipeline_entity_spec.rb')
-rw-r--r--spec/serializers/ci/pipeline_entity_spec.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/serializers/ci/pipeline_entity_spec.rb b/spec/serializers/ci/pipeline_entity_spec.rb
index f79bbd91a0a..4d9ed9fc22f 100644
--- a/spec/serializers/ci/pipeline_entity_spec.rb
+++ b/spec/serializers/ci/pipeline_entity_spec.rb
@@ -260,5 +260,17 @@ RSpec.describe Ci::PipelineEntity do
end
end
end
+
+ context 'when pipeline has coverage' do
+ let_it_be(:pipeline) { create(:ci_pipeline, project: project, user: user) }
+
+ before do
+ allow(pipeline).to receive(:coverage).and_return(35.0)
+ end
+
+ it 'exposes the coverage' do
+ expect(subject[:coverage]).to eq('35.00')
+ end
+ end
end
end