summaryrefslogtreecommitdiff
path: root/spec/unit/api_client_v1_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/api_client_v1_spec.rb')
-rw-r--r--spec/unit/api_client_v1_spec.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/unit/api_client_v1_spec.rb b/spec/unit/api_client_v1_spec.rb
index 802384534b..6c4e7fe188 100644
--- a/spec/unit/api_client_v1_spec.rb
+++ b/spec/unit/api_client_v1_spec.rb
@@ -312,20 +312,20 @@ describe Chef::ApiClientV1 do
context "and the client does not exist on the server" do
before do
@a_404_response = Net::HTTPNotFound.new("404 not found and such", nil, nil)
- @a_404_exception = Net::HTTPServerException.new("404 not found exception", @a_404_response)
+ @a_404_exception = Net::HTTPClientException.new("404 not found exception", @a_404_response)
expect(@http_client).to receive(:get).with("clients/lost-my-key").and_raise(@a_404_exception)
end
it "raises a 404 error" do
- expect { Chef::ApiClientV1.reregister("lost-my-key") }.to raise_error(Net::HTTPServerException)
+ expect { Chef::ApiClientV1.reregister("lost-my-key") }.to raise_error(Net::HTTPClientException)
end
end
end
describe "Versioned API Interactions" do
let(:response_406) { OpenStruct.new(code: "406") }
- let(:exception_406) { Net::HTTPServerException.new("406 Not Acceptable", response_406) }
+ let(:exception_406) { Net::HTTPClientException.new("406 Not Acceptable", response_406) }
let(:payload) do
{
name: "some_name",