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