diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2018-12-07 11:15:23 -0800 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2019-01-03 10:53:48 -0800 |
commit | 10db9b3a50eae9c4c966f39f5beca8f5c17d441e (patch) | |
tree | 596bb3da0bcd1e2fe9a24e3a376fd6223cb6156f /spec/unit/api_client_v1_spec.rb | |
parent | 94ba9c022e57feb2949e22656d811a843b3410f1 (diff) | |
download | chef-10db9b3a50eae9c4c966f39f5beca8f5c17d441e.tar.gz |
change HTTPServerException to HTTPClientException for ruby 2.6
includes backcompat for 2.5
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'spec/unit/api_client_v1_spec.rb')
-rw-r--r-- | spec/unit/api_client_v1_spec.rb | 6 |
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", |