#467 - Restore error handling for failed downloads

This commit is contained in:
Steve Bazyl committed 2016-09-19 14:16:36 -07:00
1 parent e13da8e05e
commit a68b8cb758
2 files changed
+18 -2

No files matched your search

+11
View File
@@ -48,6 +48,17 @@ RSpec.describe Google::Apis::Core::DownloadCommand do
end
end
context 'with error' do
before(:example) do
stub_request(:get, 'https://www.googleapis.com/zoo/animals')
.to_return(status: [404, 'Not Found'], body: '')
end
it 'should raise error' do
expect {received}.to raise_error(Google::Apis::ClientError)
end
end
context 'with disconnects' do
before(:example) do
stub_request(:get, 'https://www.googleapis.com/zoo/animals')