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/variables/downstream/raw_variable_generator_spec.rb')
-rw-r--r--spec/lib/gitlab/ci/variables/downstream/raw_variable_generator_spec.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/lib/gitlab/ci/variables/downstream/raw_variable_generator_spec.rb b/spec/lib/gitlab/ci/variables/downstream/raw_variable_generator_spec.rb
new file mode 100644
index 00000000000..12249071486
--- /dev/null
+++ b/spec/lib/gitlab/ci/variables/downstream/raw_variable_generator_spec.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+require 'fast_spec_helper'
+
+RSpec.describe Gitlab::Ci::Variables::Downstream::RawVariableGenerator, feature_category: :secrets_management do
+ let(:context) { Gitlab::Ci::Variables::Downstream::Generator::Context.new }
+
+ subject(:generator) { described_class.new(context) }
+
+ describe '#for' do
+ it 'returns an array containing the unexpanded raw variable' do
+ var = Gitlab::Ci::Variables::Collection::Item.fabricate({ key: 'VAR1', value: '$REF1', raw: true })
+
+ expect(generator.for(var)).to match_array([{ key: 'VAR1', value: '$REF1', raw: true }])
+ end
+ end
+end