Commit 1c275a75 authored by Lin Jen-Shin's avatar Lin Jen-Shin

Update description stating that ordering is important

Feedback from Grzegorz
parent 13d009ce
...@@ -424,7 +424,7 @@ describe Ci::Pipeline, models: true do ...@@ -424,7 +424,7 @@ describe Ci::Pipeline, models: true do
context 'when no ref is specified' do context 'when no ref is specified' do
let(:pipelines) { described_class.latest.all } let(:pipelines) { described_class.latest.all }
it 'returns the latest pipelines for the same ref and different sha' do 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(&:sha)).to eq(%w[C B A])
expect(pipelines.map(&:status)).to eq(%w[skipped failed success]) expect(pipelines.map(&:status)).to eq(%w[skipped failed success])
end end
...@@ -433,7 +433,7 @@ describe Ci::Pipeline, models: true do ...@@ -433,7 +433,7 @@ describe Ci::Pipeline, models: true do
context 'when ref is specified' do context 'when ref is specified' do
let(:pipelines) { described_class.latest('ref').all } let(:pipelines) { described_class.latest('ref').all }
it 'returns the latest pipelines for ref and different sha' do 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(&:sha)).to eq(%w[B A])
expect(pipelines.map(&:status)).to eq(%w[failed success]) expect(pipelines.map(&:status)).to eq(%w[failed success])
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