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>2020-03-02 18:08:01 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-02 18:08:01 +0300
commitb375c6c05fbd03aea33a9ee9f82e678bdaa8c3cc (patch)
tree55f2a32e5fd3d67597fc8c6cc2a01793ee15c87a /spec/services/ci/create_pipeline_service
parent988b28ec1a379d38f6ac9ed04886ee564fd447fd (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/services/ci/create_pipeline_service')
-rw-r--r--spec/services/ci/create_pipeline_service/custom_config_content_spec.rb18
1 files changed, 11 insertions, 7 deletions
diff --git a/spec/services/ci/create_pipeline_service/custom_config_content_spec.rb b/spec/services/ci/create_pipeline_service/custom_config_content_spec.rb
index 33cd6e164b0..2657f1d300a 100644
--- a/spec/services/ci/create_pipeline_service/custom_config_content_spec.rb
+++ b/spec/services/ci/create_pipeline_service/custom_config_content_spec.rb
@@ -4,18 +4,22 @@ require 'spec_helper'
describe Ci::CreatePipelineService do
let_it_be(:project) { create(:project, :repository) }
let_it_be(:user) { create(:admin) }
+ let(:upstream_pipeline) { create(:ci_pipeline) }
let(:ref) { 'refs/heads/master' }
let(:service) { described_class.new(project, user, { ref: ref }) }
context 'custom config content' do
let(:bridge) do
- double(:bridge, yaml_for_downstream: <<~YML
- rspec:
- script: rspec
- custom:
- script: custom
- YML
- )
+ create(:ci_bridge, status: 'running', pipeline: upstream_pipeline, project: upstream_pipeline.project).tap do |bridge|
+ allow(bridge).to receive(:yaml_for_downstream).and_return(
+ <<~YML
+ rspec:
+ script: rspec
+ custom:
+ script: custom
+ YML
+ )
+ end
end
subject { service.execute(:push, bridge: bridge) }