diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2019-05-06 18:36:02 +0300 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2019-05-24 12:04:05 +0300 |
commit | cc4a0d9a470867ba5d0c383720b573dedcf2220e (patch) | |
tree | 48d2943103f03ac7c3ba4974c735f36c2267954e /spec/serializers/pipeline_entity_spec.rb | |
parent | de24df98a3a20f87f5fed513d27a20b6238d6959 (diff) |
Add specs checking serialization of a stage builds
Diffstat (limited to 'spec/serializers/pipeline_entity_spec.rb')
-rw-r--r-- | spec/serializers/pipeline_entity_spec.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/serializers/pipeline_entity_spec.rb b/spec/serializers/pipeline_entity_spec.rb index 93d18f70cdc..6be612ec226 100644 --- a/spec/serializers/pipeline_entity_spec.rb +++ b/spec/serializers/pipeline_entity_spec.rb @@ -64,6 +64,12 @@ describe PipelineEntity do create(:ci_build, :failed, pipeline: pipeline) end + it 'does not serialize stage builds' do + subject.with_indifferent_access.dig(:details, :stages, 0).tap do |stage| + expect(stage).not_to include(:groups, :latest_statuses, :retries) + end + end + context 'user has ability to retry pipeline' do before do project.add_developer(user) @@ -92,6 +98,12 @@ describe PipelineEntity do create(:ci_build, :pending, pipeline: pipeline) end + it 'does not serialize stage builds' do + subject.with_indifferent_access.dig(:details, :stages, 0).tap do |stage| + expect(stage).not_to include(:groups, :latest_statuses, :retries) + end + end + context 'user has ability to cancel pipeline' do before do project.add_developer(user) |