From 4cd842927a60e4e81915da22983f216ccd54d6a3 Mon Sep 17 00:00:00 2001 From: Azul Date: Thu, 29 Sep 2016 12:56:14 +0200 Subject: 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. --- test/integration/dispatcher_test.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'test/integration') 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 -- cgit v1.2.3