We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3073549 commit 8b798faCopy full SHA for 8b798fa
1 file changed
spec/serpapi/client/client_spec.rb
@@ -73,7 +73,7 @@
73
it 'get endpoint error' do
74
expect {
75
client.send(:get, '/search', :json, {})
76
- }.to raise_error(SerpApi::SerpApiError).with_message(/HTTP request failed with error: Missing query `q` parameter./)
+ }.to raise_error(SerpApi::SerpApiError).with_message(/HTTP request failed with status: 400.* error: Missing query `q` parameter./)
77
end
78
79
it 'get bad endpoint' do
@@ -90,7 +90,7 @@
90
begin
91
client.send(:get, '/invalid', :html, {})
92
rescue SerpApi::SerpApiError => e
93
- expect(e.message).to include(/HTTP request failed with response status: 404 Not Found reponse/), "got #{e.message}"
+ expect(e.message).to include("HTTP request failed with status: 404")
94
rescue => e
95
raise("wrong exception: #{e}")
96
0 commit comments