diff options
author | Christian Schneider | 2024-05-08 13:37:08 +0200 |
---|---|---|
committer | Christian Schneider | 2024-05-08 13:37:08 +0200 |
commit | d4515d6d78e3902c557b8957e74e250424d7932b (patch) | |
tree | 3575fb392d640e65018c5489e21f5ca8b4138cd1 /test | |
parent | 140dc151919101c38f16d0a7dc4221941651f74d (diff) | |
download | itools-d4515d6d78e3902c557b8957e74e250424d7932b.tar.gz itools-d4515d6d78e3902c557b8957e74e250424d7932b.tar.bz2 itools-d4515d6d78e3902c557b8957e74e250424d7932b.zip |
Switch default for it_url::get*() to not return body on status >= 400
Diffstat (limited to 'test')
-rwxr-xr-x | test/it_url.t | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/it_url.t b/test/it_url.t index 5f2d1d0..2e7d4f2 100755 --- a/test/it_url.t +++ b/test/it_url.t @@ -280,6 +280,14 @@ $output = handle_server( $output = handle_server( is( + it_url::get(['url' => "http://$host/not_found_with_body", 'it_error' => false]), + false, + 'it_url::get() on 404 with body and default for body_on_fail' + ) +); + +$output = handle_server( + is( it::filter_keys(it_url::get(['url' => "http://$host/not_found_with_body", 'body_on_fail' => false, 'it_error' => false, 'assoc' => true]), 'status,data'), ['status' => 404, 'data' => null], 'it_url::get() on 404 with body, body_on_fail and assoc' |