[fix #1046] Update api entreprise host
This commit is contained in:
parent
8377cdaea1
commit
83d9831183
10 changed files with 28 additions and 28 deletions
|
@ -4,7 +4,7 @@ describe SIADE::API do
|
|||
describe '.entreprise' do
|
||||
subject { described_class.entreprise(siren) }
|
||||
before do
|
||||
stub_request(:get, "https://api-dev.apientreprise.fr/v2/entreprises/#{siren}?token=#{SIADETOKEN}")
|
||||
stub_request(:get, "https://staging.entreprise.api.gouv.fr/v2/entreprises/#{siren}?token=#{SIADETOKEN}")
|
||||
.to_return(status: status, body: body)
|
||||
end
|
||||
context 'when siren does not exist' do
|
||||
|
@ -30,7 +30,7 @@ describe SIADE::API do
|
|||
describe '.etablissement' do
|
||||
subject { described_class.etablissement(siret) }
|
||||
before do
|
||||
stub_request(:get, "https://api-dev.apientreprise.fr/v2/etablissements/#{siret}?token=#{SIADETOKEN}")
|
||||
stub_request(:get, "https://staging.entreprise.api.gouv.fr/v2/etablissements/#{siret}?token=#{SIADETOKEN}")
|
||||
.to_return(status: status, body: body)
|
||||
end
|
||||
|
||||
|
@ -57,7 +57,7 @@ describe SIADE::API do
|
|||
|
||||
describe '.exercices' do
|
||||
before do
|
||||
stub_request(:get, /https:\/\/api-dev.apientreprise.fr\/v2\/exercices\/.*token=/)
|
||||
stub_request(:get, /https:\/\/staging.entreprise.api.gouv.fr\/v2\/exercices\/.*token=/)
|
||||
.to_return(status: status, body: body)
|
||||
end
|
||||
|
||||
|
@ -88,7 +88,7 @@ describe SIADE::API do
|
|||
|
||||
describe '.rna' do
|
||||
before do
|
||||
stub_request(:get, /https:\/\/api-dev.apientreprise.fr\/v2\/associations\/.*token=/)
|
||||
stub_request(:get, /https:\/\/staging.entreprise.api.gouv.fr\/v2\/associations\/.*token=/)
|
||||
.to_return(status: status, body: body)
|
||||
end
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ describe SIADE::EntrepriseAdapter do
|
|||
subject { described_class.new('418166096').to_params }
|
||||
|
||||
before do
|
||||
stub_request(:get, "https://api-dev.apientreprise.fr/v2/entreprises/418166096?token=#{SIADETOKEN}")
|
||||
stub_request(:get, "https://staging.entreprise.api.gouv.fr/v2/entreprises/418166096?token=#{SIADETOKEN}")
|
||||
.to_return(body: File.read('spec/support/files/entreprise.json', status: 200))
|
||||
end
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ describe SIADE::EtablissementAdapter do
|
|||
subject { described_class.new(siret).to_params }
|
||||
|
||||
before do
|
||||
stub_request(:get, "https://api-dev.apientreprise.fr/v2/etablissements/#{siret}?token=#{SIADETOKEN}")
|
||||
stub_request(:get, "https://staging.entreprise.api.gouv.fr/v2/etablissements/#{siret}?token=#{SIADETOKEN}")
|
||||
.to_return(body: File.read('spec/support/files/etablissement.json', status: 200))
|
||||
end
|
||||
|
||||
|
@ -73,7 +73,7 @@ describe SIADE::EtablissementAdapter do
|
|||
subject { described_class.new(bad_siret).to_params }
|
||||
|
||||
before do
|
||||
stub_request(:get, "https://api-dev.apientreprise.fr/v2/etablissements/#{bad_siret}?token=#{SIADETOKEN}")
|
||||
stub_request(:get, "https://staging.entreprise.api.gouv.fr/v2/etablissements/#{bad_siret}?token=#{SIADETOKEN}")
|
||||
.to_return(body: 'Fake body', status: 404)
|
||||
end
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ describe SIADE::ExercicesAdapter do
|
|||
subject { described_class.new(siret).to_params }
|
||||
|
||||
before do
|
||||
stub_request(:get, /https:\/\/api-dev.apientreprise.fr\/v2\/exercices\/.*token=/)
|
||||
stub_request(:get, /https:\/\/staging.entreprise.api.gouv.fr\/v2\/exercices\/.*token=/)
|
||||
.to_return(body: File.read('spec/support/files/exercices.json', status: 200))
|
||||
end
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ describe SIADE::RNAAdapter do
|
|||
subject { described_class.new(siret).to_params }
|
||||
|
||||
before do
|
||||
stub_request(:get, /https:\/\/api-dev.apientreprise.fr\/v2\/associations\/.*token=/)
|
||||
stub_request(:get, /https:\/\/staging.entreprise.api.gouv.fr\/v2\/associations\/.*token=/)
|
||||
.to_return(body: body, status: status)
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue