Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-12-24 15:08:01 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-12-24 15:08:01 +0300
commitc6373a2cec855c6543a1e035c52099e102dd05ef (patch)
tree507c4d975e1bf559a008d997ad4b07dad14f397e /spec/services/ci/run_scheduled_build_service_spec.rb
parent6593f1f627938f22090dec5221476772d3ed581d (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/services/ci/run_scheduled_build_service_spec.rb')
-rw-r--r--spec/services/ci/run_scheduled_build_service_spec.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/services/ci/run_scheduled_build_service_spec.rb b/spec/services/ci/run_scheduled_build_service_spec.rb
index ab8d9f4ba2e..43d110cbc8f 100644
--- a/spec/services/ci/run_scheduled_build_service_spec.rb
+++ b/spec/services/ci/run_scheduled_build_service_spec.rb
@@ -26,6 +26,18 @@ describe Ci::RunScheduledBuildService do
expect(build).to be_pending
end
+
+ context 'when build requires resource' do
+ let(:resource_group) { create(:ci_resource_group, project: project) }
+
+ before do
+ build.update!(resource_group: resource_group)
+ end
+
+ it 'transits to waiting for resource status' do
+ expect { subject }.to change { build.status }.from('scheduled').to('waiting_for_resource')
+ end
+ end
end
context 'when scheduled_at is not expired' do