diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-09-01 21:10:48 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-09-01 21:10:48 +0300 |
commit | 304e230182b74eb84833c60b50618a5f0d7e2f9a (patch) | |
tree | d16015fb605f148446ba99c9de7d305de7bbe609 /spec/serializers/merge_request_poll_widget_entity_spec.rb | |
parent | adfb0e182c3e674c3dda213d0d27a5db029e4804 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/serializers/merge_request_poll_widget_entity_spec.rb')
-rw-r--r-- | spec/serializers/merge_request_poll_widget_entity_spec.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/serializers/merge_request_poll_widget_entity_spec.rb b/spec/serializers/merge_request_poll_widget_entity_spec.rb index e5f88e31025..7000d4bdb9f 100644 --- a/spec/serializers/merge_request_poll_widget_entity_spec.rb +++ b/spec/serializers/merge_request_poll_widget_entity_spec.rb @@ -285,4 +285,20 @@ RSpec.describe MergeRequestPollWidgetEntity do end end end + + describe '#builds_with_coverage' do + it 'serializes the builds with coverage' do + allow(resource).to receive(:head_pipeline_builds_with_coverage).and_return([ + double(name: 'rspec', coverage: 91.5), + double(name: 'jest', coverage: 94.1) + ]) + + result = subject[:builds_with_coverage] + + expect(result).to eq([ + { name: 'rspec', coverage: 91.5 }, + { name: 'jest', coverage: 94.1 } + ]) + end + end end |