提交 c6301865 编写于 作者: J Jacopo

Allows to cancel a Created job

上级 d867a58c
......@@ -226,7 +226,7 @@ module Ci
end
def cancelable?
active?
active? || created?
end
def retryable?
......
---
title: Allows to cancel a Created job
merge_request: 20635
author: Jacopo Beschi @jacopo-beschi
type: added
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册