From a2f5687aa3d07fad32eb816134879222e760b56b Mon Sep 17 00:00:00 2001 From: Christophe Robillard Date: Tue, 14 Nov 2023 17:22:18 +0100 Subject: [PATCH] migrate api entreprise privileges --- app/lib/api_entreprise/api.rb | 2 +- spec/lib/api_entreprise/api_spec.rb | 2 +- spec/lib/api_entreprise/privileges_adapter_spec.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/lib/api_entreprise/api.rb b/app/lib/api_entreprise/api.rb index c9e66ec3c..db53afc5a 100644 --- a/app/lib/api_entreprise/api.rb +++ b/app/lib/api_entreprise/api.rb @@ -10,7 +10,7 @@ class APIEntreprise::API ATTESTATION_SOCIALE_RESOURCE_NAME = "v4/urssaf/unites_legales/%{id}/attestation_vigilance" ATTESTATION_FISCALE_RESOURCE_NAME = "v4/dgfip/unites_legales/%{id}/attestation_fiscale" BILANS_BDF_RESOURCE_NAME = "v3/banque_de_france/unites_legales/%{id}/bilans" - PRIVILEGES_RESOURCE_NAME = "v2/privileges" + PRIVILEGES_RESOURCE_NAME = "privileges" TIMEOUT = 20 DEFAULT_API_ENTREPRISE_DELAY = 0.0 diff --git a/spec/lib/api_entreprise/api_spec.rb b/spec/lib/api_entreprise/api_spec.rb index 20d90da1b..e273402e7 100644 --- a/spec/lib/api_entreprise/api_spec.rb +++ b/spec/lib/api_entreprise/api_spec.rb @@ -300,7 +300,7 @@ describe APIEntreprise::API do before do 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) end diff --git a/spec/lib/api_entreprise/privileges_adapter_spec.rb b/spec/lib/api_entreprise/privileges_adapter_spec.rb index 6e72bf93b..391c6804c 100644 --- a/spec/lib/api_entreprise/privileges_adapter_spec.rb +++ b/spec/lib/api_entreprise/privileges_adapter_spec.rb @@ -7,7 +7,7 @@ describe APIEntreprise::PrivilegesAdapter do subject { adapter } 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) allow_any_instance_of(APIEntrepriseToken).to receive(:expired?).and_return(false) end