diff options
author | Shinya Maeda <shinya@gitlab.com> | 2017-07-27 23:09:30 +0900 |
---|---|---|
committer | Shinya Maeda <shinya@gitlab.com> | 2017-07-28 18:13:30 +0900 |
commit | 34d2b8e702da63ea6d79cbfe498a5bfcb3938e11 (patch) | |
tree | 4ece377ab4ec37488d655d9d42533b114839a8a8 /spec/requests | |
parent | a2a7fc1f9ecb61eb1f2e11b21795f64b8161ec7e (diff) | |
download | gitlab-ce-34d2b8e702da63ea6d79cbfe498a5bfcb3938e11.tar.gz |
Use let(:pipeline) for variables spec in triggers_spec.rb
Diffstat (limited to 'spec/requests')
-rw-r--r-- | spec/requests/api/triggers_spec.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/spec/requests/api/triggers_spec.rb b/spec/requests/api/triggers_spec.rb index 0b42a603885..91507bf0e23 100644 --- a/spec/requests/api/triggers_spec.rb +++ b/spec/requests/api/triggers_spec.rb @@ -82,8 +82,7 @@ describe API::Triggers do post api("/projects/#{project.id}/trigger/pipeline"), options.merge(variables: variables, ref: 'master') expect(response).to have_http_status(201) - expect(Ci::Pipeline.last.variables.first.key).to eq(variables.keys.first) - expect(Ci::Pipeline.last.variables.first.value).to eq(variables.values.first) + expect(pipeline.variables.map { |v| {v.key => v.value} }.last).to eq(variables) end end end |