summaryrefslogtreecommitdiff
path: root/tests/it_url.t
diff options
context:
space:
mode:
Diffstat (limited to 'tests/it_url.t')
-rwxr-xr-xtests/it_url.t16
1 files changed, 14 insertions, 2 deletions
diff --git a/tests/it_url.t b/tests/it_url.t
index 83f818f..379a4cb 100755
--- a/tests/it_url.t
+++ b/tests/it_url.t
@@ -235,12 +235,24 @@ if (!ok(
$output = handle_server(
ok(
!it_url::get(array('url' => 'http://localhost:8000/does_not_exist', 'retries' => 4)),
- 'it_url::get() retries on empty response'
+ 'it_url::get() on 404'
+ )
+);
+if (!ok(
+ count(preg_grep('/^Got Request:/', $output)) == 1,
+ 'it_url::get() does not retry on 404'
+))
+ diag($output);
+
+$output = handle_server(
+ ok(
+ !it_url::get(array('url' => 'http://localhost:8000/repeat?num=0', 'retries' => 4)),
+ 'it_url::get() on empty page'
)
);
if (!ok(
count(preg_grep('/^Got Request:/', $output)) == 5,
- 'it_url::get() respects set retry count'
+ 'it_url::get() does retry on empty page'
))
diag($output);