summaryrefslogtreecommitdiff
path: root/test/integration/dispatcher_test.rb
diff options
context:
space:
mode:
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