feat(dossier): fork dossier when editing en construction

This commit is contained in:
Paul Chavard 2023-03-21 18:24:39 +01:00 committed by Colin Darie
parent 025bd5beaf
commit 08a2a2c9aa
No known key found for this signature in database
GPG key ID: 4FB865FDBCA4BCC4
20 changed files with 193 additions and 99 deletions

View file

@ -115,8 +115,8 @@ describe 'shared/dossiers/edit', type: :view do
let(:dossier) { create(:dossier, :en_construction) }
before { dossier.champs_public << champ }
it 'cannot delete a piece justificative' do
expect(subject).not_to have_selector("[title='Supprimer le fichier #{champ.piece_justificative_file.attachments[0].filename}']")
it 'can delete a piece justificative' do
expect(subject).to have_selector("[title='Supprimer le fichier #{champ.piece_justificative_file.attachments[0].filename}']")
end
end