diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2018-02-28 10:54:16 +0100 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2018-02-28 10:54:16 +0100 |
commit | 6eeb837f3d8e31fefde0b214995a9c60acd4d7cc (patch) | |
tree | b1df1787247b1db45efb257c5ef7cbba1221f3e4 /spec/lib | |
parent | c52255884ea1a54d66c0e5e52a67c25ad1a62644 (diff) | |
parent | 886988c9e1ab6020da9636b935522fac55a19c1e (diff) | |
download | gitlab-ce-6eeb837f3d8e31fefde0b214995a9c60acd4d7cc.tar.gz |
Merge branch 'feature/gb/pipeline-variable-expressions' into feature/gb/variables-expressions-in-only-except
* feature/gb/pipeline-variable-expressions:
Do not use keyword args to pass expression variables
Diffstat (limited to 'spec/lib')
-rw-r--r-- | spec/lib/gitlab/ci/pipeline/expression/lexeme/variable_spec.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/lib/gitlab/ci/pipeline/expression/lexeme/variable_spec.rb b/spec/lib/gitlab/ci/pipeline/expression/lexeme/variable_spec.rb index 91f59669b02..599a5411881 100644 --- a/spec/lib/gitlab/ci/pipeline/expression/lexeme/variable_spec.rb +++ b/spec/lib/gitlab/ci/pipeline/expression/lexeme/variable_spec.rb @@ -22,6 +22,13 @@ describe Gitlab::Ci::Pipeline::Expression::Lexeme::Variable do .to eq 'my variable' end + it 'allows to use a string as a variable key too' do + variable = described_class.new('VARIABLE') + + expect(variable.evaluate('VARIABLE' => 'my variable')) + .to eq 'my variable' + end + it 'returns nil if it is not defined' do variable = described_class.new('VARIABLE') |