diff options
Diffstat (limited to 'spec/unit/api_client_spec.rb')
-rw-r--r-- | spec/unit/api_client_spec.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/unit/api_client_spec.rb b/spec/unit/api_client_spec.rb index e83906e712..e6b2eec820 100644 --- a/spec/unit/api_client_spec.rb +++ b/spec/unit/api_client_spec.rb @@ -280,13 +280,13 @@ describe Chef::ApiClient 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::ApiClient.reregister("lost-my-key") }.to raise_error(Net::HTTPServerException) + expect { Chef::ApiClient.reregister("lost-my-key") }.to raise_error(Net::HTTPClientException) end end |