提交 cc4a0d9a 编写于 作者: G Grzegorz Bizon 提交者: Filipa Lacerda

Add specs checking serialization of a stage builds

上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册