Commit 66b3bd5e authored by Shinya Maeda's avatar Shinya Maeda

Add spec for build_action_entity_spec

parent 5905d89b
...@@ -22,5 +22,17 @@ describe BuildActionEntity do ...@@ -22,5 +22,17 @@ describe BuildActionEntity do
it 'contains whether it is playable' do it 'contains whether it is playable' do
expect(subject[:playable]).to eq job.playable? expect(subject[:playable]).to eq job.playable?
end 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
end end
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