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/presenters/ci/build_runner_presenter_spec.rb')
-rw-r--r--spec/presenters/ci/build_runner_presenter_spec.rb24
1 files changed, 24 insertions, 0 deletions
diff --git a/spec/presenters/ci/build_runner_presenter_spec.rb b/spec/presenters/ci/build_runner_presenter_spec.rb
index 43b677483ce..1eecc9d1ce6 100644
--- a/spec/presenters/ci/build_runner_presenter_spec.rb
+++ b/spec/presenters/ci/build_runner_presenter_spec.rb
@@ -271,4 +271,28 @@ RSpec.describe Ci::BuildRunnerPresenter do
end
end
end
+
+ describe '#variables' do
+ subject { presenter.variables }
+
+ let(:build) { create(:ci_build) }
+
+ it 'returns a Collection' do
+ is_expected.to be_an_instance_of(Gitlab::Ci::Variables::Collection)
+ end
+ end
+
+ describe '#runner_variables' do
+ subject { presenter.runner_variables }
+
+ let(:build) { create(:ci_build) }
+
+ it 'returns an array' do
+ is_expected.to be_an_instance_of(Array)
+ end
+
+ it 'returns the expected variables' do
+ is_expected.to eq(presenter.variables.to_runner_variables)
+ end
+ end
end