aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorKazuki Yamaguchi <k@rhe.jp>2015-08-17 18:48:00 +0900
committerKazuki Yamaguchi <k@rhe.jp>2015-08-18 16:19:31 +0900
commitec059733e3e63ac461e8477638ad5d0a7d65dc58 (patch)
tree93832299c0009803075b757e6a4d1e2e1590cddb /test
parent850af19b0259fafaa196175c45f72de1ec7f5084 (diff)
downloadplum-ec059733e3e63ac461e8477638ad5d0a7d65dc58.tar.gz
http_connection: raise LegacyHTTPError instead of sending 505 (HTTP Version Not Supported) HTTP/1.1 response
Diffstat (limited to 'test')
-rw-r--r--test/plum/test_http_connection.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/plum/test_http_connection.rb b/test/plum/test_http_connection.rb
index 1560c96..fc451d0 100644
--- a/test/plum/test_http_connection.rb
+++ b/test/plum/test_http_connection.rb
@@ -55,7 +55,8 @@ class HTTPConnectionNegotiationTest < Minitest::Test
"User-Agent: nya\r\n" <<
"Connection: close\r\n" <<
"\r\n"
- con << req
- assert(io.string.include?("HTTP/1.1 505 "), "Response is not HTTP/1.1 505: #{io.string}")
+ assert_raises(LegacyHTTPError) {
+ con << req
+ }
end
end