Fix test
This commit is contained in:
parent
bd89688346
commit
5fb678e53b
1 changed files with 3 additions and 5 deletions
|
@ -7,7 +7,7 @@ describe SIADE::EtablissementAdapter do
|
|||
|
||||
before do
|
||||
stub_request(:get, "https://api-dev.apientreprise.fr/v2/etablissements/#{siret}?token=#{SIADETOKEN}")
|
||||
.to_return(body: File.read('spec/support/files/etablissement.json', status: 200))
|
||||
.to_return(body: File.read('spec/support/files/etablissement.json', status: 200))
|
||||
end
|
||||
|
||||
it '#to_params class est une Hash ?' do
|
||||
|
@ -74,11 +74,9 @@ describe SIADE::EtablissementAdapter do
|
|||
|
||||
before do
|
||||
stub_request(:get, "https://api-dev.apientreprise.fr/v2/etablissements/#{bad_siret}?token=#{SIADETOKEN}")
|
||||
.to_return(body: 'Fake body', status: 404)
|
||||
.to_return(body: 'Fake body', status: 404)
|
||||
end
|
||||
|
||||
it 'raises exception RestClient::ResourceNotFound' do
|
||||
expect { subject }.to raise_error(RestClient::ResourceNotFound)
|
||||
end
|
||||
it { expect(subject).to be_nil }
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue