Add spec for Deployment#scheduled_actions
This commit is contained in:
parent
c8c01bbe02
commit
3fb7a1f97a
|
@ -12,11 +12,26 @@ describe Deployment do
|
|||
it { is_expected.to delegate_method(:commit).to(:project) }
|
||||
it { is_expected.to delegate_method(:commit_title).to(:commit).as(:try) }
|
||||
it { is_expected.to delegate_method(:manual_actions).to(:deployable).as(:try) }
|
||||
it { is_expected.to delegate_method(:scheduled_actions).to(:deployable).as(:try) }
|
||||
|
||||
it { is_expected.to validate_presence_of(:ref) }
|
||||
it { is_expected.to validate_presence_of(:sha) }
|
||||
|
||||
describe '#scheduled_actions' do
|
||||
subject { deployment.scheduled_actions }
|
||||
|
||||
let(:project) { create(:project, :repository) }
|
||||
let(:pipeline) { create(:ci_pipeline, project: project) }
|
||||
let(:build) { create(:ci_build, :success, pipeline: pipeline) }
|
||||
let(:deployment) { create(:deployment, deployable: build) }
|
||||
|
||||
it 'delegates to other_scheduled_actions' do
|
||||
expect_any_instance_of(Ci::Build)
|
||||
.to receive(:other_scheduled_actions)
|
||||
|
||||
subject
|
||||
end
|
||||
end
|
||||
|
||||
describe 'modules' do
|
||||
it_behaves_like 'AtomicInternalId' do
|
||||
let(:internal_id_attribute) { :iid }
|
||||
|
|
Loading…
Reference in New Issue