summaryrefslogtreecommitdiff
path: root/spec/services
diff options
context:
space:
mode:
authorMatija Čupić <matteeyah@gmail.com>2018-05-04 12:35:36 +0200
committerMatija Čupić <matteeyah@gmail.com>2018-05-04 12:35:36 +0200
commitc6e394bb8499b470b9d2a0c03c8ce7fd023fa08a (patch)
tree8f3050e8d9a12d809c48ceda8eb0a411ad6259b7 /spec/services
parent980fb6fb26a360894bba7444d0020381ab825c8d (diff)
downloadgitlab-ce-c6e394bb8499b470b9d2a0c03c8ce7fd023fa08a.tar.gz
Improve variable comparison
Diffstat (limited to 'spec/services')
-rw-r--r--spec/services/ci/create_pipeline_service_spec.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/spec/services/ci/create_pipeline_service_spec.rb b/spec/services/ci/create_pipeline_service_spec.rb
index 24717898c33..9a0b6efd8a9 100644
--- a/spec/services/ci/create_pipeline_service_spec.rb
+++ b/spec/services/ci/create_pipeline_service_spec.rb
@@ -557,9 +557,8 @@ describe Ci::CreatePipelineService do
subject { execute_service(variables_attributes: variables_attributes) }
it 'creates a pipeline with specified variables' do
- 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])
+ expect(subject.variables.map { |var| var.slice(:key, :secret_value) })
+ .to eq variables_attributes.map(&:with_indifferent_access)
end
end
end