Commit bb0483dc authored by Matija Čupić's avatar Matija Čupić

Move the empty state extended status to be the beginning

parent d6509274
...@@ -4,17 +4,17 @@ module Gitlab ...@@ -4,17 +4,17 @@ module Gitlab
module Build module Build
class Factory < Status::Factory class Factory < Status::Factory
def self.extended_statuses def self.extended_statuses
[[Status::Build::Cancelable, [[Status::Build::Manual,
Status::Build::Canceled,
Status::Build::Created,
Status::Build::Pending,
Status::Build::Skipped],
[Status::Build::Cancelable,
Status::Build::Retryable], Status::Build::Retryable],
[Status::Build::FailedAllowed, [Status::Build::FailedAllowed,
Status::Build::Play, Status::Build::Play,
Status::Build::Stop], Status::Build::Stop],
[Status::Build::Action], [Status::Build::Action]]
[Status::Build::Manual,
Status::Build::Canceled,
Status::Build::Created,
Status::Build::Pending,
Status::Build::Skipped]]
end end
def self.common_helpers def self.common_helpers
......
...@@ -104,7 +104,7 @@ describe Gitlab::Ci::Status::Build::Factory do ...@@ -104,7 +104,7 @@ describe Gitlab::Ci::Status::Build::Factory do
it 'matches correct extended statuses' do it 'matches correct extended statuses' do
expect(factory.extended_statuses) expect(factory.extended_statuses)
.to eq [Gitlab::Ci::Status::Build::Retryable] .to eq [Gitlab::Ci::Status::Build::Canceled, Gitlab::Ci::Status::Build::Retryable]
end end
it 'fabricates a retryable build status' do it 'fabricates a retryable build status' do
...@@ -157,7 +157,7 @@ describe Gitlab::Ci::Status::Build::Factory do ...@@ -157,7 +157,7 @@ describe Gitlab::Ci::Status::Build::Factory do
it 'matches correct extended statuses' do it 'matches correct extended statuses' do
expect(factory.extended_statuses) expect(factory.extended_statuses)
.to eq [Gitlab::Ci::Status::Build::Cancelable] .to eq [Gitlab::Ci::Status::Build::Pending, Gitlab::Ci::Status::Build::Cancelable]
end end
it 'fabricates a cancelable build status' do it 'fabricates a cancelable build status' do
...@@ -182,12 +182,12 @@ describe Gitlab::Ci::Status::Build::Factory do ...@@ -182,12 +182,12 @@ describe Gitlab::Ci::Status::Build::Factory do
expect(factory.core_status).to be_a Gitlab::Ci::Status::Skipped expect(factory.core_status).to be_a Gitlab::Ci::Status::Skipped
end end
it 'does not match extended statuses' do it 'matches correct extended statuses' do
expect(factory.extended_statuses).to be_empty expect(factory.extended_statuses).to eq [Gitlab::Ci::Status::Build::Skipped]
end end
it 'fabricates a core skipped status' do it 'fabricates a skipped build status' do
expect(status).to be_a Gitlab::Ci::Status::Skipped expect(status).to be_a Gitlab::Ci::Status::Build::Skipped
end end
it 'fabricates status with correct details' do it 'fabricates status with correct details' do
...@@ -211,7 +211,8 @@ describe Gitlab::Ci::Status::Build::Factory do ...@@ -211,7 +211,8 @@ describe Gitlab::Ci::Status::Build::Factory do
it 'matches correct extended statuses' do it 'matches correct extended statuses' do
expect(factory.extended_statuses) expect(factory.extended_statuses)
.to eq [Gitlab::Ci::Status::Build::Play, .to eq [Gitlab::Ci::Status::Build::Manual,
Gitlab::Ci::Status::Build::Play,
Gitlab::Ci::Status::Build::Action] Gitlab::Ci::Status::Build::Action]
end end
...@@ -259,7 +260,8 @@ describe Gitlab::Ci::Status::Build::Factory do ...@@ -259,7 +260,8 @@ describe Gitlab::Ci::Status::Build::Factory do
it 'matches correct extended statuses' do it 'matches correct extended statuses' do
expect(factory.extended_statuses) expect(factory.extended_statuses)
.to eq [Gitlab::Ci::Status::Build::Stop, .to eq [Gitlab::Ci::Status::Build::Manual,
Gitlab::Ci::Status::Build::Stop,
Gitlab::Ci::Status::Build::Action] Gitlab::Ci::Status::Build::Action]
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