diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2018-03-14 13:04:42 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2018-03-14 13:04:42 +0300 |
commit | 1d57db0d8d9ed0515fb1839e963550a60d86cb70 (patch) | |
tree | 010180a48ae2a737614beec7d42448afa420000e /spec | |
parent | e7e06566e150af8ecc54c67bd6f5cd5b86c99628 (diff) |
Improve predefined variables collection methods
Diffstat (limited to 'spec')
-rw-r--r-- | spec/lib/gitlab/ci/variables/collection_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/lib/gitlab/ci/variables/collection_spec.rb b/spec/lib/gitlab/ci/variables/collection_spec.rb index 005e2bb17b4..90b6e178242 100644 --- a/spec/lib/gitlab/ci/variables/collection_spec.rb +++ b/spec/lib/gitlab/ci/variables/collection_spec.rb @@ -35,6 +35,11 @@ describe Gitlab::Ci::Variables::Collection do expect(subject).to be_one end + + it 'returns self' do + expect(subject.append(key: 'VAR', value: 'test')) + .to eq subject + end end describe '#concat' do @@ -60,6 +65,11 @@ describe Gitlab::Ci::Variables::Collection do expect(collection).to include(key: 'VAR_2', value: '2', public: true) expect(collection).to include(key: 'VAR_3', value: '3', public: true) end + + it 'returns self' do + expect(subject.concat([key: 'VAR', value: 'test'])) + .to eq subject + end end describe '#+' do |