diff options
author | Matija Čupić <matteeyah@gmail.com> | 2018-04-18 19:28:34 +0200 |
---|---|---|
committer | Matija Čupić <matteeyah@gmail.com> | 2018-04-18 19:28:34 +0200 |
commit | 80cc9df926b5dddfa0d8eeeeaba43bda8fdba401 (patch) | |
tree | 17f6b0d68f0e082e4b84ffee22cf30e96e6a57aa /spec | |
parent | 2a9a01b955c1f8081d669724d8592e4cac7d5f19 (diff) | |
download | gitlab-ce-80cc9df926b5dddfa0d8eeeeaba43bda8fdba401.tar.gz |
Use variables_attributes intead of variables
Diffstat (limited to 'spec')
-rw-r--r-- | spec/services/ci/create_pipeline_service_spec.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/spec/services/ci/create_pipeline_service_spec.rb b/spec/services/ci/create_pipeline_service_spec.rb index 652603df854..24717898c33 100644 --- a/spec/services/ci/create_pipeline_service_spec.rb +++ b/spec/services/ci/create_pipeline_service_spec.rb @@ -18,12 +18,12 @@ describe Ci::CreatePipelineService do message: 'Message', ref: ref_name, trigger_request: nil, - variables: nil) + variables_attributes: nil) params = { ref: ref, before: '00000000', after: after, commits: [{ message: message }], - variables_attributes: variables } + variables_attributes: variables_attributes } described_class.new(project, user, params).execute( source, trigger_request: trigger_request) @@ -549,17 +549,17 @@ describe Ci::CreatePipelineService do end context 'when pipeline variables are specified' do - let(:variables) do + let(:variables_attributes) do [{ key: 'first', secret_value: 'world' }, { key: 'second', secret_value: 'second_world' }] end - subject { execute_service(variables: variables) } + subject { execute_service(variables_attributes: variables_attributes) } it 'creates a pipeline with specified variables' do - expect(subject.variables.count).to eq(variables.count) - expect(subject.variables.first.key).to eq(variables.first[:key]) - expect(subject.variables.last.secret_value).to eq(variables.last[:secret_value]) + expect(subject.variables.count).to eq(variables_attributes.count) + expect(subject.variables.first.key).to eq(variables_attributes.first[:key]) + expect(subject.variables.last.secret_value).to eq(variables_attributes.last[:secret_value]) end end end |