diff --git a/config/initializers/urls.rb b/config/initializers/urls.rb index 7d279eec6..afd9bcbd9 100644 --- a/config/initializers/urls.rb +++ b/config/initializers/urls.rb @@ -1,6 +1,6 @@ # API URLs API_ADRESSE_URL = ENV.fetch("API_ADRESSE_URL", "https://api-adresse.data.gouv.fr") -API_CARTO_URL = ENV.fetch("API_CARTO_URL", "https://apicarto.sgmap.fr") +API_CARTO_URL = ENV.fetch("API_CARTO_URL", "https://sandbox.geo.api.gouv.fr/apicarto") API_ENTREPRISE_URL = ENV.fetch("API_ENTREPRISE_URL", "https://entreprise.api.gouv.fr/v2") API_GEO_URL = ENV.fetch("API_GEO_URL", "https://geo.api.gouv.fr") API_GEO_SANDBOX_URL = ENV.fetch("API_GEO_SANDBOX_URL", "https://sandbox.geo.api.gouv.fr") diff --git a/spec/lib/api_carto/api_spec.rb b/spec/lib/api_carto/api_spec.rb index 900debfda..2e52a58b1 100644 --- a/spec/lib/api_carto/api_spec.rb +++ b/spec/lib/api_carto/api_spec.rb @@ -5,7 +5,7 @@ describe ApiCarto::API do subject { described_class.search_qp(geojson) } before do - stub_request(:post, "https://apicarto.sgmap.fr/quartiers-prioritaires/search") + stub_request(:post, "https://sandbox.geo.api.gouv.fr/apicarto/quartiers-prioritaires/search") .with(:body => /.*/, :headers => { 'Content-Type' => 'application/json' }) .to_return(status: status, body: body) @@ -53,7 +53,7 @@ describe ApiCarto::API do subject { described_class.search_cadastre(geojson) } before do - stub_request(:post, "https://apicarto.sgmap.fr/cadastre/geometrie") + stub_request(:post, "https://sandbox.geo.api.gouv.fr/apicarto/cadastre/geometrie") .with(:body => /.*/, :headers => { 'Content-Type' => 'application/json' }) .to_return(status: status, body: body) diff --git a/spec/lib/api_carto/cadastre_adapter_spec.rb b/spec/lib/api_carto/cadastre_adapter_spec.rb index 6aa2858ca..aaba3cae7 100644 --- a/spec/lib/api_carto/cadastre_adapter_spec.rb +++ b/spec/lib/api_carto/cadastre_adapter_spec.rb @@ -4,7 +4,7 @@ describe ApiCarto::CadastreAdapter do subject { described_class.new(coordinates).results } before do - stub_request(:post, "https://apicarto.sgmap.fr/cadastre/geometrie") + stub_request(:post, "https://sandbox.geo.api.gouv.fr/apicarto/cadastre/geometrie") .with(:body => /.*/, :headers => { 'Content-Type' => 'application/json' }) .to_return(status: status, body: body) diff --git a/spec/lib/api_carto/quartiers_prioritaires_adapter_spec.rb b/spec/lib/api_carto/quartiers_prioritaires_adapter_spec.rb index b4ac7ef3a..32f5eb60b 100644 --- a/spec/lib/api_carto/quartiers_prioritaires_adapter_spec.rb +++ b/spec/lib/api_carto/quartiers_prioritaires_adapter_spec.rb @@ -4,7 +4,7 @@ describe ApiCarto::QuartiersPrioritairesAdapter do subject { described_class.new(coordinates).results } before do - stub_request(:post, "https://apicarto.sgmap.fr/quartiers-prioritaires/search") + stub_request(:post, "https://sandbox.geo.api.gouv.fr/apicarto/quartiers-prioritaires/search") .with(:body => /.*/, :headers => { 'Content-Type' => 'application/json' }) .to_return(status: status, body: body)