From 1d57db0d8d9ed0515fb1839e963550a60d86cb70 Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Wed, 14 Mar 2018 11:04:42 +0100 Subject: Improve predefined variables collection methods --- spec/lib/gitlab/ci/variables/collection_spec.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'spec/lib/gitlab/ci/variables/collection_spec.rb') 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 -- cgit v1.2.3