Appelle l'API entreprise avec le token en Header

This commit is contained in:
kara Diaby 2020-12-10 15:28:39 +01:00
parent 8febbadad6
commit f748ccfc9e
23 changed files with 42 additions and 41 deletions

View file

@ -206,7 +206,7 @@ describe Users::DossiersController, type: :controller do
before do
sign_in(user)
stub_request(:get, /https:\/\/entreprise.api.gouv.fr\/v2\/etablissements\/#{siret}?.*token=/)
stub_request(:get, /https:\/\/entreprise.api.gouv.fr\/v2\/etablissements\/#{siret}/)
.to_return(status: api_etablissement_status, body: api_etablissement_body)
allow_any_instance_of(ApiEntrepriseToken).to receive(:roles)
.and_return(["attestations_fiscales", "attestations_sociales", "bilans_entreprise_bdf"])