- Correction des tests suite à la modification du schéma de la base de données.
This commit is contained in:
parent
5f3a320f2f
commit
b3383bec9f
51 changed files with 462 additions and 585 deletions
|
@ -1,7 +1,7 @@
|
|||
require 'spec_helper'
|
||||
|
||||
feature 'user is on description page' do
|
||||
let(:dossier) { create(:dossier, :with_entreprise) }
|
||||
let(:dossier) { create(:dossier, :with_entreprise, :with_procedure) }
|
||||
before do
|
||||
visit dossier_description_path dossier
|
||||
end
|
||||
|
@ -20,9 +20,9 @@ feature 'user is on description page' do
|
|||
it 'dossier cerfa is empty' do
|
||||
expect(dossier.cerfa).to be_empty
|
||||
end
|
||||
it 'pieces_jointes are empty' do
|
||||
dossier.pieces_jointes.each do |piece_jointe|
|
||||
expect(piece_jointe).to be_empty
|
||||
it 'pieces_justificatives are empty' do
|
||||
dossier.pieces_justificatives.each do |piece_justificative|
|
||||
expect(piece_justificative).to be_empty
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -36,15 +36,15 @@ feature 'user is on description page' do
|
|||
expect(dossier.cerfa).not_to be_empty
|
||||
end
|
||||
end
|
||||
context 'when he adds a piece_jointe and submit form' do
|
||||
context 'when he adds a piece_justificative and submit form' do
|
||||
before do
|
||||
file_input_id = 'piece_jointe_' + dossier.pieces_jointes.first.type.to_s
|
||||
file_input_id = 'piece_justificative_' + dossier.pieces_justificatives.first.type.to_s
|
||||
attach_file(file_input_id, File.path('spec/support/files/dossierPDF.pdf'))
|
||||
click_on('Terminer la procédure')
|
||||
dossier.reload
|
||||
end
|
||||
scenario 'fills the given piece_jointe' do
|
||||
expect(dossier.pieces_jointes.first).not_to be_empty
|
||||
scenario 'fills the given piece_justificative' do
|
||||
expect(dossier.pieces_justificatives.first).not_to be_empty
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue