Add spec for build_action_entity_spec
This commit is contained in:
parent
5905d89b92
commit
66b3bd5e26
1 changed files with 12 additions and 0 deletions
|
@ -22,5 +22,17 @@ describe BuildActionEntity do
|
|||
it 'contains whether it is playable' do
|
||||
expect(subject[:playable]).to eq job.playable?
|
||||
end
|
||||
|
||||
context 'when job is scheduled' do
|
||||
let(:job) { create(:ci_build, :scheduled) }
|
||||
|
||||
it 'returns scheduled_at' do
|
||||
expect(subject[:scheduled_at]).to eq(job.scheduled_at)
|
||||
end
|
||||
|
||||
it 'returns unschedule path' do
|
||||
expect(subject[:unschedule_path]).to include "jobs/#{job.id}/unschedule"
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue