Merge pull request #9713 from demarches-simplifiees/8742-privileges

tech: migration api entreprise privileges
This commit is contained in:
krichtof 2023-11-16 08:46:24 +00:00 committed by GitHub
commit ba17f8d8aa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View file

@ -10,7 +10,7 @@ class APIEntreprise::API
ATTESTATION_SOCIALE_RESOURCE_NAME = "v4/urssaf/unites_legales/%{id}/attestation_vigilance" ATTESTATION_SOCIALE_RESOURCE_NAME = "v4/urssaf/unites_legales/%{id}/attestation_vigilance"
ATTESTATION_FISCALE_RESOURCE_NAME = "v4/dgfip/unites_legales/%{id}/attestation_fiscale" ATTESTATION_FISCALE_RESOURCE_NAME = "v4/dgfip/unites_legales/%{id}/attestation_fiscale"
BILANS_BDF_RESOURCE_NAME = "v3/banque_de_france/unites_legales/%{id}/bilans" BILANS_BDF_RESOURCE_NAME = "v3/banque_de_france/unites_legales/%{id}/bilans"
PRIVILEGES_RESOURCE_NAME = "v2/privileges" PRIVILEGES_RESOURCE_NAME = "privileges"
TIMEOUT = 20 TIMEOUT = 20
DEFAULT_API_ENTREPRISE_DELAY = 0.0 DEFAULT_API_ENTREPRISE_DELAY = 0.0

View file

@ -300,7 +300,7 @@ describe APIEntreprise::API do
before do before do
api.token = token api.token = token
stub_request(:get, "https://entreprise.api.gouv.fr/v2/privileges") stub_request(:get, "https://entreprise.api.gouv.fr/privileges")
.to_return(body: body, status: status) .to_return(body: body, status: status)
end end

View file

@ -7,7 +7,7 @@ describe APIEntreprise::PrivilegesAdapter do
subject { adapter } subject { adapter }
before do before do
stub_request(:get, "https://entreprise.api.gouv.fr/v2/privileges") stub_request(:get, "https://entreprise.api.gouv.fr/privileges")
.to_return(body: body, status: status) .to_return(body: body, status: status)
allow_any_instance_of(APIEntrepriseToken).to receive(:expired?).and_return(false) allow_any_instance_of(APIEntrepriseToken).to receive(:expired?).and_return(false)
end end