2023-05-03 15:08:21 +02:00
|
|
|
describe InitiationProcedureConcern do
|
|
|
|
describe '.create_initiation_procedure' do
|
2024-06-01 22:50:48 +02:00
|
|
|
let(:administrateur) { administrateurs(:default_admin) }
|
2023-05-03 15:08:21 +02:00
|
|
|
subject { Procedure.create_initiation_procedure(administrateur) }
|
|
|
|
|
|
|
|
it "returns a new procedure" do
|
2024-01-25 17:35:05 +01:00
|
|
|
subject
|
|
|
|
subject.reload
|
2023-05-03 15:08:21 +02:00
|
|
|
expect(subject).to be_valid
|
|
|
|
expect(subject.defaut_groupe_instructeur.instructeurs.count).to eq(1)
|
|
|
|
expect(subject.draft_revision.types_de_champ_public).not_to be_empty
|
|
|
|
expect(subject.service).not_to be_nil
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|