From 4f42504a8c67208c89595a92fa393d7222fb9cf4 Mon Sep 17 00:00:00 2001 From: Christian Schneider Date: Tue, 7 May 2024 14:31:21 +0200 Subject: Add type for assoc with maxlength, make test for 404 stricter --- test/it_url.t | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/it_url.t b/test/it_url.t index b6ef5ba..5f2d1d0 100755 --- a/test/it_url.t +++ b/test/it_url.t @@ -190,6 +190,14 @@ handle_server( ) ); +handle_server( + is( + it::filter_keys(it_url::get(['url' => "http://$host/", 'maxlength' => 5, 'it_error' => false, 'assoc' => true]), 'status,data'), + ['status' => 204, 'data' => null], + 'it_url::get() static call with port and too small maxlength' + ) +); + handle_server( is( it_url::get("http://$host/temp_redirect"), @@ -263,8 +271,9 @@ $output = handle_server( ); $output = handle_server( - ok( - !it_url::get(['url' => "http://$host/not_found_with_body", 'body_on_fail' => false, 'it_error' => false]), + is( + it_url::get(['url' => "http://$host/not_found_with_body", 'body_on_fail' => false, 'it_error' => false]), + false, 'it_url::get() on 404 with body and body_on_fail' ) ); -- cgit v1.2.3