diff options
Diffstat (limited to 'spec/serializers/merge_requests/pipeline_entity_spec.rb')
-rw-r--r-- | spec/serializers/merge_requests/pipeline_entity_spec.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/serializers/merge_requests/pipeline_entity_spec.rb b/spec/serializers/merge_requests/pipeline_entity_spec.rb index 6970b547f12..ee99ab2e7dd 100644 --- a/spec/serializers/merge_requests/pipeline_entity_spec.rb +++ b/spec/serializers/merge_requests/pipeline_entity_spec.rb @@ -14,6 +14,7 @@ RSpec.describe MergeRequests::PipelineEntity do allow(request).to receive(:current_user).and_return(user) allow(request).to receive(:project).and_return(project) + allow(pipeline).to receive(:coverage).and_return(35.0) end let(:entity) do @@ -35,6 +36,10 @@ RSpec.describe MergeRequests::PipelineEntity do expect(subject[:flags]).to include(:merge_request_pipeline) end + it 'returns presented coverage' do + expect(subject[:coverage]).to eq('35.00') + end + it 'excludes coverage data when disabled' do entity = described_class .represent(pipeline, request: request, disable_coverage: true) |