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:
authorFrancisco Javier López <fjlopez@gitlab.com>2018-07-05 16:55:10 +0300
committerDouwe Maan <douwe@gitlab.com>2018-07-05 16:55:10 +0300
commita7a1531fe5d030d47d63bfcd86a7168a8437ff86 (patch)
tree65854ce75eb6b6f6061fef114f95076fae2ab9a8 /spec/services/ci/register_job_service_spec.rb
parent9a62e72db9892708ab360c59a9f77695d9253c34 (diff)
Web Terminal Ci Build
Diffstat (limited to 'spec/services/ci/register_job_service_spec.rb')
-rw-r--r--spec/services/ci/register_job_service_spec.rb17
1 files changed, 15 insertions, 2 deletions
diff --git a/spec/services/ci/register_job_service_spec.rb b/spec/services/ci/register_job_service_spec.rb
index 3816bd0deb5..dbb5e33bbdc 100644
--- a/spec/services/ci/register_job_service_spec.rb
+++ b/spec/services/ci/register_job_service_spec.rb
@@ -548,8 +548,21 @@ module Ci
end
end
- def execute(runner)
- described_class.new(runner).execute.build
+ context 'when runner_session params are' do
+ it 'present sets runner session configuration in the build' do
+ runner_session_params = { session: { 'url' => 'https://example.com' } }
+
+ expect(execute(specific_runner, runner_session_params).runner_session.attributes)
+ .to include(runner_session_params[:session])
+ end
+
+ it 'not present it does not configure the runner session' do
+ expect(execute(specific_runner).runner_session).to be_nil
+ end
+ end
+
+ def execute(runner, params = {})
+ described_class.new(runner).execute(params).build
end
end
end