Commit 91795dcd authored by Grzegorz Bizon's avatar Grzegorz Bizon

Merge branch '48320-cancel-a-created-job' into 'master'

Resolve "CI: cancel/skip a job in "created" state using a button"

Closes #48320

See merge request gitlab-org/gitlab-ce!20635
parents 52646106 c6301865
......@@ -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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment