Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzegorz@gitlab.com>2016-12-24 10:16:30 +0300
committerGrzegorz Bizon <grzegorz@gitlab.com>2016-12-24 10:16:30 +0300
commit52a259dd84031819bc24638963ea1a12fe56fd30 (patch)
tree63fb2b024f79de7d9abbb4f3d12cf6cf93f9afd7 /spec/models/ci
parent1c3c5c2bbda09d43a034d665cfacfd0c4f334f45 (diff)
Revert "Merge branch 'fix-latest-pipeine-ordering' into 'master'"
This reverts merge request !8286
Diffstat (limited to 'spec/models/ci')
-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