summaryrefslogtreecommitdiff
path: root/test/unit/request_handler_test.rb
diff options
context:
space:
mode:
authorazul <azul@riseup.net>2016-07-12 10:39:58 +0200
committerGitHub <noreply@github.com>2016-07-12 10:39:58 +0200
commitd7599715c6d24534dcccbe29cfc058e534039053 (patch)
tree14824b08c4d0889e9767171ac5bafe3316a607f9 /test/unit/request_handler_test.rb
parent27196b87e8d0ce5325381ea96ccd68ced8ee2e4d (diff)
parent6732fef4df156a02ed83f006f19f66cf567b5340 (diff)
Merge pull request #5 from azul/celluloid
Use Celluloid, Reel and Celluloid I/O based http requests
Diffstat (limited to 'test/unit/request_handler_test.rb')
-rw-r--r--test/unit/request_handler_test.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/test/unit/request_handler_test.rb b/test/unit/request_handler_test.rb
index c9d316f..ef656f9 100644
--- a/test/unit/request_handler_test.rb
+++ b/test/unit/request_handler_test.rb
@@ -13,6 +13,11 @@ class Nickserver::RequestHandlerTest < Minitest::Test
assert_response status: 500, content: "500 Not a valid address\n"
end
+ def test_missing_domain
+ handle address: ['valid@email.tld']
+ assert_response status: 500, content: "500 HTTP request must include a Host header.\n"
+ end
+
protected
def handle(params = {}, headers = {})
@@ -21,8 +26,7 @@ class Nickserver::RequestHandlerTest < Minitest::Test
end
def assert_response(args)
- args[:content_type] ||= 'text/plain'
- responder.expect :send_response, nil, [args]
+ responder.expect :respond, nil, [args[:status], args[:content]]
handler.respond_to @params, @headers
responder.verify
end