mirror of
https://github.com/rest-client/rest-client.git
synced 2022-11-09 13:49:40 -05:00
Fix warnings and accidentally passing test.
This commit is contained in:
parent
abd27673f4
commit
aaeab33184
1 changed files with 3 additions and 2 deletions
|
@ -79,11 +79,12 @@ describe RestClient::Response, :include_helpers do
|
||||||
end
|
end
|
||||||
|
|
||||||
it "should throw an exception for other codes" do
|
it "should throw an exception for other codes" do
|
||||||
RestClient::Exceptions::EXCEPTIONS_MAP.each_key do |code|
|
RestClient::Exceptions::EXCEPTIONS_MAP.each_pair do |code, exc|
|
||||||
unless (200..207).include? code
|
unless (200..207).include? code
|
||||||
net_http_res = response_double(:code => code.to_i)
|
net_http_res = response_double(:code => code.to_i)
|
||||||
resp = RestClient::Response.create('abc', net_http_res, @request)
|
resp = RestClient::Response.create('abc', net_http_res, @request)
|
||||||
expect { resp.return! }.to raise_error
|
allow(@request).to receive(:max_redirects).and_return(5)
|
||||||
|
expect { resp.return! }.to raise_error(exc)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue