Commit 136bfef3 authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Fix flaky spec due to non-deterministic order

parent 3b180468
...@@ -34,7 +34,7 @@ describe Ci::CreatePipelineService do ...@@ -34,7 +34,7 @@ describe Ci::CreatePipelineService do
it 'creates a pipeline using the content passed in as param' do it 'creates a pipeline using the content passed in as param' do
expect(subject).to be_persisted expect(subject).to be_persisted
expect(subject.builds.map(&:name)).to eq %w[rspec custom] expect(subject.builds.pluck(:name)).to match_array %w[rspec custom]
expect(subject.config_source).to eq 'bridge_source' expect(subject.config_source).to eq 'bridge_source'
end end
...@@ -59,7 +59,7 @@ describe Ci::CreatePipelineService do ...@@ -59,7 +59,7 @@ describe Ci::CreatePipelineService do
it 'created a pipeline using the content passed in as param and download the artifact' do it 'created a pipeline using the content passed in as param and download the artifact' do
expect(subject).to be_persisted expect(subject).to be_persisted
expect(subject.builds.pluck(:name)).to eq %w[rspec time custom] expect(subject.builds.pluck(:name)).to match_array %w[rspec time custom]
expect(subject.config_source).to eq 'bridge_source' expect(subject.config_source).to eq 'bridge_source'
end 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