Skip to content
Snippets Groups Projects
Commit c6301865 authored by Jacopo's avatar Jacopo
Browse files

Allows to cancel a Created job

parent d867a58c
No related branches found
No related tags found
1 merge request!10495Merge Requests - Assignee
Loading
Loading
@@ -226,7 +226,7 @@ module Ci
end
 
def cancelable?
active?
active? || created?
end
 
def retryable?
Loading
Loading
---
title: Allows to cancel a Created job
merge_request: 20635
author: Jacopo Beschi @jacopo-beschi
type: added
Loading
Loading
@@ -1103,6 +1103,12 @@ describe Ci::Build do
 
it { is_expected.to be_cancelable }
end
context 'when build is created' do
let(:build) { create(:ci_build, :created) }
it { is_expected.to be_cancelable }
end
end
 
context 'when build is not cancelable' do
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment