We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5319e6c commit 4ac114cCopy full SHA for 4ac114c
2 files changed
lib/session_validator/client.rb
@@ -31,7 +31,7 @@ def valid?(msid)
31
32
log Logger::DEBUG, "response code: #{response.code}, response body: #{response.body}"
33
34
- !response.is_a? Net::HTTPNotFound
+ response.is_a? Net::HTTPSuccess or response.is_a? Net::HTTPServerError
35
rescue Net::OpenTimeout
36
log Logger::DEBUG, "open timeout"
37
true
spec/session_validator/client_spec.rb
@@ -46,6 +46,12 @@
46
it { is_expected.to eq false }
47
end
48
49
+ context "client is not configured properly" do
50
+ before { http_request.to_return status: [401, "Unauthorized"] }
51
+
52
+ it { is_expected.to eq false }
53
+ end
54
55
context "service is not working properly" do
56
before { http_request.to_return status: [500, "Internal Server Error"] }
57
0 commit comments