Commit 34d2b8e7 authored by Shinya Maeda's avatar Shinya Maeda

Use let(:pipeline) for variables spec in triggers_spec.rb

parent a2a7fc1f
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment