diff options
Diffstat (limited to 'spec')
-rw-r--r-- | spec/unit/server_api_spec.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/unit/server_api_spec.rb b/spec/unit/server_api_spec.rb index 3f1d9b0e90..1116eec9d9 100644 --- a/spec/unit/server_api_spec.rb +++ b/spec/unit/server_api_spec.rb @@ -121,4 +121,10 @@ describe Chef::ServerAPI do client.get("foo") end end + + it "does not retry a 406 Not Acceptable" do + WebMock.disable_net_connect! + stub_request(:get, "http://chef.example.com:4000/foo").to_return(status: [406, "Not Acceptable"]) + expect { client.get("foo") }.to raise_error(Net::HTTPServerException) + end end |