test(type_de_champ): mandatory by default, like schema
This commit is contained in:
parent
48e5a237e3
commit
f40b71f450
19 changed files with 89 additions and 58 deletions
|
@ -1,6 +1,6 @@
|
|||
describe PiecesJustificativesService do
|
||||
describe 'pjs_for_champs' do
|
||||
let(:procedure) { create(:procedure, types_de_champ_public: [{ type: :piece_justificative }, { type: :repetition, children: [{ type: :piece_justificative }] }]) }
|
||||
let(:procedure) { create(:procedure, types_de_champ_public: [{ type: :piece_justificative, mandatory: false }, { type: :repetition, mandatory: false, children: [{ type: :piece_justificative, mandatory: false }] }]) }
|
||||
let(:dossier) { create(:dossier, procedure: procedure) }
|
||||
let(:dossiers) { Dossier.where(id: dossier.id) }
|
||||
let(:witness) { create(:dossier, procedure: procedure) }
|
||||
|
@ -477,8 +477,8 @@ describe PiecesJustificativesService do
|
|||
let(:user_profile) { build(:administrateur) }
|
||||
let(:types_de_champ_public) do
|
||||
[
|
||||
{ type: :repetition, children: [{ type: :piece_justificative }] },
|
||||
{ type: :repetition, children: [{ type: :piece_justificative }, { type: :piece_justificative }] }
|
||||
{ type: :repetition, mandatory: false, children: [{ type: :piece_justificative }] },
|
||||
{ type: :repetition, mandatory: false, children: [{ type: :piece_justificative }, { type: :piece_justificative }] }
|
||||
]
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue