summaryrefslogtreecommitdiff
path: root/tests/it_url.t
diff options
context:
space:
mode:
authorNathan Gass2017-10-12 11:38:57 +0200
committerNathan Gass2017-10-12 11:38:57 +0200
commit846a5a273275a4b7c9df066fcc1317418e283ec8 (patch)
tree9252cb06efe4972dfde1e6596f54f061185c0bab /tests/it_url.t
parentb8e699d2b11f0a75c9aa2dbdd005a063738b6668 (diff)
downloaditools-846a5a273275a4b7c9df066fcc1317418e283ec8.tar.gz
itools-846a5a273275a4b7c9df066fcc1317418e283ec8.tar.bz2
itools-846a5a273275a4b7c9df066fcc1317418e283ec8.zip
add test for correct handling of Location for 201 created http result
Diffstat (limited to 'tests/it_url.t')
-rwxr-xr-xtests/it_url.t10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/it_url.t b/tests/it_url.t
index d2fbae0..9a4594e 100755
--- a/tests/it_url.t
+++ b/tests/it_url.t
@@ -3,6 +3,8 @@
# Tests for url.class, currently only constructor's parser
+it::getopt("Usage: it_url.t [OPTIONS]");
+
# Create object and parse url
$url = new it_url('HTTP://falcon:joshua@www.Relog.CH:80/default.asp');
@@ -219,6 +221,14 @@ handle_server(
)
);
+handle_server(
+ is(
+ it_url::get('http://localhost:8000/created_redirect'),
+ "Testserver output *before* created redirect",
+ 'it_url::get() does not follow Location of 201 (Created) result'
+ )
+);
+
$output = handle_server(
ok(
!it_url::get(U('http://localhost:8000/redirect_loop', array('num' => 10))),