Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Make sure GeneralError is raised when unknown http error happens

It was misspelled as GenericError, instead of GeneralErorr. This commit
adds a test to make sure it is raised.
  • Loading branch information...
commit ee8d85a8889ffb4d940e695942d357f43ca4d8b6 1 parent 7b3ad0f
Eugene Pimenov authored

Showing 2 changed files with 5 additions and 1 deletion. Show diff stats Hide diff stats

  1. +1 1  lib/viadeo/helpers/request.rb
  2. +4 0 spec/query_spec.rb
2  lib/viadeo/helpers/request.rb
@@ -106,7 +106,7 @@ def parse_errors(response)
106 106 when 502..503
107 107 Viadeo::Errors::UnavailableError
108 108 else
109   - Viadeo::Errors::GenericError
  109 + Viadeo::Errors::GeneralError
110 110 end
111 111
112 112 klass.new(parsed_response.status, parsed_response.headers, parsed_response.body)
4 spec/query_spec.rb
@@ -36,6 +36,10 @@
36 36 expect(obj.body.params.param1).to eq('test')
37 37 end
38 38
  39 + it 'raises generic error when unknown error code occurs' do
  40 + expect { client.get '/_raise_http_418' }.to raise_error(Viadeo::Errors::GeneralError)
  41 + end
  42 +
39 43 end
40 44
41 45 describe '#post' do

0 comments on commit ee8d85a

Please sign in to comment.
Something went wrong with that request. Please try again.