summaryrefslogtreecommitdiff
path: root/spec/serializers/build_action_entity_spec.rb
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2018-10-05 16:30:33 +0000
committerKamil Trzciński <ayufan@ayufan.eu>2018-10-05 16:30:33 +0000
commit059da9bc8eb9355a760031ef8e73b0aa6285012f (patch)
treeb6057c99d0c53951a650122d624dc37405194551 /spec/serializers/build_action_entity_spec.rb
parent7f86172f806558d2b614abcb06cef0ea516c5900 (diff)
parent7542a5d102bc48f5f7b8104fda22f0975b2dd931 (diff)
downloadgitlab-ce-059da9bc8eb9355a760031ef8e73b0aa6285012f.tar.gz
Merge branch 'scheduled-manual-jobs' into 'master'
Delayed jobs Closes #51352 See merge request gitlab-org/gitlab-ce!21767
Diffstat (limited to 'spec/serializers/build_action_entity_spec.rb')
-rw-r--r--spec/serializers/build_action_entity_spec.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/serializers/build_action_entity_spec.rb b/spec/serializers/build_action_entity_spec.rb
index 15720d86583..9e2bee2ee60 100644
--- a/spec/serializers/build_action_entity_spec.rb
+++ b/spec/serializers/build_action_entity_spec.rb
@@ -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