summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorRegis <boudinot.regis@yahoo.com>2016-12-24 14:12:06 -0700
committerRegis <boudinot.regis@yahoo.com>2016-12-24 14:12:06 -0700
commitd57faaa040bf885481f5a27e12cabc62eeda7ee0 (patch)
tree0ecc5dcd92ea8cce4e295c40c6c0424d6c8f86d7 /spec
parente56254d38ab4a3c3deeacadbc2388b76d932805d (diff)
parent645412b57f558d58418aad278c9a3bf421439e1c (diff)
downloadgitlab-ce-d57faaa040bf885481f5a27e12cabc62eeda7ee0.tar.gz
Merge branch 'master' into auto-pipelines-vue
Diffstat (limited to 'spec')
-rw-r--r--spec/models/ci/pipeline_spec.rb14
1 files changed, 8 insertions, 6 deletions
diff --git a/spec/models/ci/pipeline_spec.rb b/spec/models/ci/pipeline_spec.rb
index b28da6daabf..dc377d15f15 100644
--- a/spec/models/ci/pipeline_spec.rb
+++ b/spec/models/ci/pipeline_spec.rb
@@ -424,18 +424,20 @@ describe Ci::Pipeline, models: true do
context 'when no ref is specified' do
let(:pipelines) { described_class.latest.all }
- it 'gives the latest pipelines for the same ref and different sha in reverse chronological order' do
- expect(pipelines.map(&:sha)).to eq(%w[C B A])
- expect(pipelines.map(&:status)).to eq(%w[skipped failed success])
+ it 'returns the latest pipeline for the same ref and different sha' do
+ expect(pipelines.map(&:sha)).to contain_exactly('A', 'B', 'C')
+ expect(pipelines.map(&:status)).
+ to contain_exactly('success', 'failed', 'skipped')
end
end
context 'when ref is specified' do
let(:pipelines) { described_class.latest('ref').all }
- it 'gives the latest pipelines for ref and different sha in reverse chronological order' do
- expect(pipelines.map(&:sha)).to eq(%w[B A])
- expect(pipelines.map(&:status)).to eq(%w[failed success])
+ it 'returns the latest pipeline for ref and different sha' do
+ expect(pipelines.map(&:sha)).to contain_exactly('A', 'B')
+ expect(pipelines.map(&:status)).
+ to contain_exactly('success', 'failed')
end
end
end