Add specs checking serialization of a stage builds
This commit is contained in:
parent
de24df98a3
commit
cc4a0d9a47
1 changed files with 12 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue