This commit is contained in:
Xavier J 2016-09-16 17:18:29 +02:00
parent bd89688346
commit 5fb678e53b

View file

@ -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