summaryrefslogtreecommitdiff
path: root/spec/lib/ci
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2016-12-14 22:38:40 +0800
committerLin Jen-Shin <godfat@godfat.org>2016-12-15 17:05:53 +0800
commit05bc71c856c735fa364e15db62ba5d40cfd7c5ef (patch)
tree319a6aadfda6b3867df342ed5f9565101d9f3dcb /spec/lib/ci
parent3e90aa1119fc4c77e92e6492f1906f252d90b64e (diff)
downloadgitlab-ce-05bc71c856c735fa364e15db62ba5d40cfd7c5ef.tar.gz
Convert CI YAML variables keys into strings
So that this would be more consistent with the other variables, which all of them are string based. Closes #25554
Diffstat (limited to 'spec/lib/ci')
-rw-r--r--spec/lib/ci/gitlab_ci_yaml_processor_spec.rb24
1 files changed, 12 insertions, 12 deletions
diff --git a/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb b/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb
index ff5dcc06ab3..62d68721574 100644
--- a/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb
+++ b/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb
@@ -483,7 +483,7 @@ module Ci
context 'when global variables are defined' do
let(:variables) do
- { VAR1: 'value1', VAR2: 'value2' }
+ { 'VAR1' => 'value1', 'VAR2' => 'value2' }
end
let(:config) do
{
@@ -495,18 +495,18 @@ module Ci
it 'returns global variables' do
expect(subject).to contain_exactly(
- { key: :VAR1, value: 'value1', public: true },
- { key: :VAR2, value: 'value2', public: true }
+ { key: 'VAR1', value: 'value1', public: true },
+ { key: 'VAR2', value: 'value2', public: true }
)
end
end
context 'when job and global variables are defined' do
let(:global_variables) do
- { VAR1: 'global1', VAR3: 'global3' }
+ { 'VAR1' => 'global1', 'VAR3' => 'global3' }
end
let(:job_variables) do
- { VAR1: 'value1', VAR2: 'value2' }
+ { 'VAR1' => 'value1', 'VAR2' => 'value2' }
end
let(:config) do
{
@@ -518,9 +518,9 @@ module Ci
it 'returns all unique variables' do
expect(subject).to contain_exactly(
- { key: :VAR3, value: 'global3', public: true },
- { key: :VAR1, value: 'value1', public: true },
- { key: :VAR2, value: 'value2', public: true }
+ { key: 'VAR3', value: 'global3', public: true },
+ { key: 'VAR1', value: 'value1', public: true },
+ { key: 'VAR2', value: 'value2', public: true }
)
end
end
@@ -535,13 +535,13 @@ module Ci
context 'when syntax is correct' do
let(:variables) do
- { VAR1: 'value1', VAR2: 'value2' }
+ { 'VAR1' => 'value1', 'VAR2' => 'value2' }
end
it 'returns job variables' do
expect(subject).to contain_exactly(
- { key: :VAR1, value: 'value1', public: true },
- { key: :VAR2, value: 'value2', public: true }
+ { key: 'VAR1', value: 'value1', public: true },
+ { key: 'VAR2', value: 'value2', public: true }
)
end
end
@@ -549,7 +549,7 @@ module Ci
context 'when syntax is incorrect' do
context 'when variables defined but invalid' do
let(:variables) do
- [ :VAR1, 'value1', :VAR2, 'value2' ]
+ [ 'VAR1', 'value1', 'VAR2', 'value2' ]
end
it 'raises error' do