Skip to content
Snippets Groups Projects
Verified Commit c6e394bb authored by Matija Čupić's avatar Matija Čupić
Browse files

Improve variable comparison

parent 980fb6fb
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -44,7 +44,8 @@ describe Gitlab::Ci::Pipeline::Chain::Build do
expect(pipeline.tag).to be false
expect(pipeline.user).to eq user
expect(pipeline.project).to eq project
expect(pipeline.variables.size).to eq variables_attributes.count
expect(pipeline.variables.map { |var| var.slice(:key, :secret_value) })
.to eq variables_attributes.map(&:with_indifferent_access)
end
 
it 'sets a valid config source' do
Loading
Loading
Loading
Loading
@@ -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
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment