Merge pull request #3462 from Keirua/feat/3404-date-depot-instructeur

Ajout de la date de depot pour l'instructeur
This commit is contained in:
Pierre de La Morinerie 2019-02-19 12:06:30 +01:00 committed by GitHub
commit d4efc0bb75
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 0 deletions

View file

@ -1,4 +1,8 @@
.container
- if dossier.en_construction_at.present?
.card
= render partial: "shared/dossiers/horodatage", locals: { dossier: dossier }
.tab-title Identité du demandeur
.card
= render partial: "shared/dossiers/user_infos", locals: { user: dossier.user }

View file

@ -0,0 +1,5 @@
%table.table.vertical.dossier-champs
%tbody
%tr
%th.libelle Déposé le :
%td= l(dossier.en_construction_at, format: '%d %B %Y')

View file

@ -16,6 +16,7 @@ describe 'new_user/dossiers/demande.html.haml', type: :view do
end
it 'renders the dossier infos' do
expect(rendered).to have_text('Déposé le')
expect(rendered).to have_text('Identité')
expect(rendered).to have_text('Demande')
expect(rendered).to have_text('Pièces jointes')
@ -29,4 +30,10 @@ describe 'new_user/dossiers/demande.html.haml', type: :view do
let(:dossier) { create(:dossier, :en_instruction, :with_entreprise, procedure: procedure) }
it { is_expected.not_to have_link('Modifier le dossier') }
end
context 'when the dossier has no en_construction_at date' do
let(:dossier) { create(:dossier, :with_entreprise, procedure: procedure) }
it { expect(rendered).not_to have_text('Déposé le') }
end
end