Add spec for build_action_entity_spec

This commit is contained in:
Shinya Maeda 2018-10-03 15:09:48 +09:00
parent 5905d89b92
commit 66b3bd5e26

View file

@ -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