Skip to content

Commit

Permalink
Add specs checking serialization of a stage builds
Browse files Browse the repository at this point in the history
  • Loading branch information
grzesiek authored and Filipa Lacerda committed May 24, 2019
1 parent de24df9 commit cc4a0d9
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions spec/serializers/pipeline_entity_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@
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)
Expand Down Expand Up @@ -92,6 +98,12 @@
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)
Expand Down

0 comments on commit cc4a0d9

Please sign in to comment.