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:
Diffstat (limited to 'spec/lib/gitlab/ci/yaml_processor_spec.rb')
-rw-r--r--spec/lib/gitlab/ci/yaml_processor_spec.rb38
1 files changed, 34 insertions, 4 deletions
diff --git a/spec/lib/gitlab/ci/yaml_processor_spec.rb b/spec/lib/gitlab/ci/yaml_processor_spec.rb
index 5f46607b042..ebb5c91ebad 100644
--- a/spec/lib/gitlab/ci/yaml_processor_spec.rb
+++ b/spec/lib/gitlab/ci/yaml_processor_spec.rb
@@ -9,10 +9,6 @@ module Gitlab
subject { described_class.new(config, user: nil).execute }
- before do
- stub_feature_flags(allow_unsafe_ruby_regexp: false)
- end
-
shared_examples 'returns errors' do |error_message|
it 'adds a message when an error is encountered' do
expect(subject.errors).to include(error_message)
@@ -329,6 +325,40 @@ module Gitlab
end
end
end
+
+ describe 'bridge job' do
+ let(:config) do
+ YAML.dump(rspec: {
+ trigger: {
+ project: 'namespace/project',
+ branch: 'main'
+ }
+ })
+ end
+
+ it 'has the attributes' do
+ expect(subject[:options]).to eq(
+ trigger: { project: 'namespace/project', branch: 'main' }
+ )
+ end
+
+ context 'with forward' do
+ let(:config) do
+ YAML.dump(rspec: {
+ trigger: {
+ project: 'namespace/project',
+ forward: { pipeline_variables: true }
+ }
+ })
+ end
+
+ it 'has the attributes' do
+ expect(subject[:options]).to eq(
+ trigger: { project: 'namespace/project', forward: { pipeline_variables: true } }
+ )
+ end
+ end
+ end
end
describe '#stages_attributes' do