Commit cc4a0d9a authored by Grzegorz Bizon's avatar Grzegorz Bizon Committed by Filipa Lacerda

Add specs checking serialization of a stage builds

parent de24df98
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment