fix(champs): don't fail on updated_at comparison when champ is not persisted
This commit is contained in:
parent
4412aa7d9c
commit
455086c1d7
2 changed files with 14 additions and 0 deletions
|
@ -51,4 +51,17 @@ describe 'shared/dossiers/demande', type: :view do
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
context 'when a champ is freshly build' do
|
||||
let(:procedure) { create(:procedure, :published, :with_type_de_champ) }
|
||||
before do
|
||||
dossier.champs_public.first.destroy
|
||||
end
|
||||
|
||||
it 'renders without error' do
|
||||
procedure.active_revision.types_de_champ.each do |tdc|
|
||||
expect(subject).to include(tdc.libelle)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue