Commit 4dd70b9e authored by Shinya Maeda's avatar Shinya Maeda Committed by Alessio Caiazza

Fix spec

parent f1226cd5
...@@ -330,7 +330,7 @@ describe Gitlab::Ci::Status::Build::Factory do ...@@ -330,7 +330,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::Scheduled, .to eq [Gitlab::Ci::Status::Build::Scheduled,
Gitlab::Ci::Status::Build::Play, Gitlab::Ci::Status::Build::Unschedule,
Gitlab::Ci::Status::Build::Action] Gitlab::Ci::Status::Build::Action]
end end
...@@ -344,9 +344,9 @@ describe Gitlab::Ci::Status::Build::Factory do ...@@ -344,9 +344,9 @@ describe Gitlab::Ci::Status::Build::Factory do
expect(status.icon).to eq 'status_scheduled' expect(status.icon).to eq 'status_scheduled'
expect(status.favicon).to eq 'favicon_status_scheduled' expect(status.favicon).to eq 'favicon_status_scheduled'
expect(status.illustration).to include(:image, :size, :title, :content) expect(status.illustration).to include(:image, :size, :title, :content)
expect(status.label).to include 'manual play action' expect(status.label).to include 'unschedule action'
expect(status).to have_details expect(status).to have_details
expect(status.action_path).to include 'play' expect(status.action_path).to include 'unschedule'
end end
context 'when user has ability to play action' do context 'when user has ability to play action' do
......
...@@ -15,7 +15,7 @@ describe Gitlab::Ci::Status::Pipeline::Blocked do ...@@ -15,7 +15,7 @@ describe Gitlab::Ci::Status::Pipeline::Blocked do
describe '#label' do describe '#label' do
it 'overrides status label' do it 'overrides status label' do
expect(subject.label).to eq 'waiting for manual action or delayed job' expect(subject.label).to eq 'waiting for manual action'
end end
end end
......
...@@ -23,11 +23,16 @@ describe Gitlab::Ci::Status::Pipeline::Factory do ...@@ -23,11 +23,16 @@ describe Gitlab::Ci::Status::Pipeline::Factory do
expect(factory.core_status).to be_a expected_status expect(factory.core_status).to be_a expected_status
end end
if HasStatus::BLOCKED_STATUS.include?(simple_status) if simple_status == 'manual'
it 'matches a correct extended statuses' do it 'matches a correct extended statuses' do
expect(factory.extended_statuses) expect(factory.extended_statuses)
.to eq [Gitlab::Ci::Status::Pipeline::Blocked] .to eq [Gitlab::Ci::Status::Pipeline::Blocked]
end end
elsif simple_status == 'scheduled'
it 'matches a correct extended statuses' do
expect(factory.extended_statuses)
.to eq [Gitlab::Ci::Status::Pipeline::Scheduled]
end
else else
it 'does not match extended statuses' do it 'does not match extended statuses' do
expect(factory.extended_statuses).to be_empty expect(factory.extended_statuses).to be_empty
......
...@@ -117,6 +117,7 @@ pipelines: ...@@ -117,6 +117,7 @@ pipelines:
- retryable_builds - retryable_builds
- cancelable_statuses - cancelable_statuses
- manual_actions - manual_actions
- scheduled_actions
- artifacts - artifacts
- pipeline_schedule - pipeline_schedule
- merge_requests - merge_requests
......
...@@ -143,7 +143,7 @@ describe StuckCiJobsWorker do ...@@ -143,7 +143,7 @@ describe StuckCiJobsWorker do
expect(Ci::Build.scheduled.count).to eq(0) expect(Ci::Build.scheduled.count).to eq(0)
expect(job).to be_failed expect(job).to be_failed
expect(job).to be_schedule_expired expect(job).to be_stale_schedule
end end
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