test/support/restfully_accesible_stub.rb in yao-0.8.0 vs test/support/restfully_accesible_stub.rb in yao-0.9.0

- old
+ new

@@ -17,9 +17,19 @@ status: 404, body: "itemNotFound" ) end + def stub_get_request_unauthorized(url) + stub_request(:get, url) + .with( + headers: request_headers + ).to_return( + status: 401, + body: "unauthorized" + ) + end + def request_headers {'Accept'=>'application/json', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'User-Agent'=>"Faraday v#{Faraday::VERSION}"} end end