diff options
Diffstat (limited to 'spec/lib/gitlab/ci/pipeline/seed/pipeline_spec.rb')
-rw-r--r-- | spec/lib/gitlab/ci/pipeline/seed/pipeline_spec.rb | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/spec/lib/gitlab/ci/pipeline/seed/pipeline_spec.rb b/spec/lib/gitlab/ci/pipeline/seed/pipeline_spec.rb index a76b4874eca..55980ae72a0 100644 --- a/spec/lib/gitlab/ci/pipeline/seed/pipeline_spec.rb +++ b/spec/lib/gitlab/ci/pipeline/seed/pipeline_spec.rb @@ -6,7 +6,9 @@ RSpec.describe Gitlab::Ci::Pipeline::Seed::Pipeline do let_it_be(:project) { create(:project, :repository) } let_it_be(:pipeline) { create(:ci_pipeline, project: project) } - let(:seed_context) { Gitlab::Ci::Pipeline::Seed::Context.new(pipeline, root_variables: []) } + let(:root_variables) { [] } + + let(:seed_context) { Gitlab::Ci::Pipeline::Seed::Context.new(pipeline, root_variables: root_variables) } let(:stages_attributes) do [ @@ -75,4 +77,12 @@ RSpec.describe Gitlab::Ci::Pipeline::Seed::Pipeline do expect(seed.deployments_count).to eq(2) end end + + describe '#root_variables' do + let(:root_variables) { %w[var1 value1] } + + it 'returns root_variables' do + expect(seed.root_variables).to eq(root_variables) + end + end end |