diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-12-06 21:14:09 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-12-06 21:14:09 +0300 |
commit | a15c9bc9eb04dcee1369c5fd6248c6352915ad21 (patch) | |
tree | 3f40f6f76615d85a7bfa45d5b1045d2fbe22860f /spec/serializers/ci/pipeline_entity_spec.rb | |
parent | 55242833f832095a6fcff00b1ccacbc5900ee52a (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/serializers/ci/pipeline_entity_spec.rb')
-rw-r--r-- | spec/serializers/ci/pipeline_entity_spec.rb | 12 |
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 |