summaryrefslogtreecommitdiff
path: root/test/integration/dispatcher_test.rb
diff options
context:
space:
mode:
authorAzul <azul@riseup.net>2016-09-29 12:56:14 +0200
committerAzul <azul@riseup.net>2016-09-29 12:56:14 +0200
commit4cd842927a60e4e81915da22983f216ccd54d6a3 (patch)
tree413c53fab7a7a7d108de4b192b60f24dc3265169 /test/integration/dispatcher_test.rb
parentbde67131c2382883f7957fa06d85b471a18c09d4 (diff)
skip tests with ConnectionErrors
We handle these errors nicely in the dispatcher and have tests for that. Tests should fail or err out when running into exceptions we are not handling yet. But for these it's better to just skip.
Diffstat (limited to 'test/integration/dispatcher_test.rb')
-rw-r--r--test/integration/dispatcher_test.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/integration/dispatcher_test.rb b/test/integration/dispatcher_test.rb
index 4757e83..b551e87 100644
--- a/test/integration/dispatcher_test.rb
+++ b/test/integration/dispatcher_test.rb
@@ -59,7 +59,7 @@ class Nickserver::DispatcherTest < Minitest::Test
handle address: ['valid@email.tld'], headers: { "Host" => "http://nickserver.me" }
stub_nicknym_raises
hkp_source.expect :query, nil, [Nickserver::EmailAddress]
- assert_response response(status: 502, content: "HTTP::ConnectionError")
+ assert_response http_connection_error
end
def test_email_via_nicknym
@@ -126,6 +126,11 @@ class Nickserver::DispatcherTest < Minitest::Test
response status: 500, content: "500 #{msg}\n"
end
+ def http_connection_error
+ response status: 502,
+ content: JSON.dump(error: "HTTP::ConnectionError")
+ end
+
def response(options)
Nickserver::Response.new(options[:status], options[:content])
end