diff --git a/spec/models/ci/pipeline_spec.rb b/spec/models/ci/pipeline_spec.rb index f5d206e0a3e1fd0a58a1c509ff332b8b54526f4e..b28da6daabf929bfb243665c4b5c329095e95068 100644 --- a/spec/models/ci/pipeline_spec.rb +++ b/spec/models/ci/pipeline_spec.rb @@ -424,7 +424,7 @@ describe Ci::Pipeline, models: true do context 'when no ref is specified' do 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(&:status)).to eq(%w[skipped failed success]) end @@ -433,7 +433,7 @@ describe Ci::Pipeline, models: true do context 'when ref is specified' do 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(&:status)).to eq(%w[failed success]) end