diff options
-rw-r--r-- | test/httptest.lua | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/httptest.lua b/test/httptest.lua index 0b61729..86cb8af 100644 --- a/test/httptest.lua +++ b/test/httptest.lua | |||
@@ -278,6 +278,18 @@ ignore = { | |||
278 | } | 278 | } |
279 | check_request(request, expect, ignore) | 279 | check_request(request, expect, ignore) |
280 | 280 | ||
281 | write("testing wrong scheme: ") | ||
282 | request = { | ||
283 | url = "wrong://" .. host .. cgiprefix .. "/cat", | ||
284 | method = "GET" | ||
285 | } | ||
286 | expect = { | ||
287 | error = "unknown scheme 'wrong'" | ||
288 | } | ||
289 | ignore = { | ||
290 | } | ||
291 | check_request(request, expect, ignore) | ||
292 | |||
281 | local body | 293 | local body |
282 | write("testing simple get function: ") | 294 | write("testing simple get function: ") |
283 | body = HTTP.get("http://" .. host .. prefix .. "/index.html") | 295 | body = HTTP.get("http://" .. host .. prefix .. "/index.html") |