Add on information entreprise :
- SIRET Siège social - Code naf - Code effectif - Numéro TVA intracommunautaire - Exercices
This commit is contained in:
parent
803ca14f72
commit
dd8bafab49
18 changed files with 233 additions and 21 deletions
|
@ -53,6 +53,9 @@ describe Users::DossiersController, type: :controller do
|
|||
|
||||
stub_request(:get, "https://api-dev.apientreprise.fr/api/v1/entreprises/#{siren}?token=#{SIADETOKEN}")
|
||||
.to_return(status: 200, body: File.read('spec/support/files/entreprise.json'))
|
||||
|
||||
stub_request(:get, "https://api-dev.apientreprise.fr/api/v1/etablissements/exercices/#{siret}?token=#{SIADETOKEN}")
|
||||
.to_return(status: 200, body: File.read('spec/support/files/exercices.json'))
|
||||
end
|
||||
|
||||
describe 'professionnel fills form' do
|
||||
|
@ -98,6 +101,10 @@ describe Users::DossiersController, type: :controller do
|
|||
expect(Etablissement.last.entreprise).to eq(Entreprise.last)
|
||||
end
|
||||
|
||||
it 'creates exercices for dossier' do
|
||||
expect { subject }.to change { Exercice.count }.by(3)
|
||||
end
|
||||
|
||||
it 'links procedure to dossier' do
|
||||
subject
|
||||
expect(Dossier.last.procedure).to eq(Procedure.last)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue