Mercurial > hg > nginx-tests
changeset 337:43d40a678a64
Tests: added rewrite test for response without reason phrase.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Thu, 19 Sep 2013 12:22:55 +0400 |
parents | b6c7db85bad0 |
children | 8f0010dc4b09 |
files | rewrite.t |
diffstat | 1 files changed, 13 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/rewrite.t Wed Sep 18 21:38:27 2013 +0400 +++ b/rewrite.t Thu Sep 19 12:22:55 2013 +0400 @@ -21,7 +21,7 @@ select STDERR; $| = 1; select STDOUT; $| = 1; -my $t = Test::Nginx->new()->has(qw/http rewrite/)->plan(21) +my $t = Test::Nginx->new()->has(qw/http rewrite/)->plan(22) ->write_file_expand('nginx.conf', <<'EOF'); %%TEST_GLOBALS%% @@ -58,6 +58,10 @@ return 200; } + location /return306 { + return 306; + } + location /return405 { return 405; } @@ -151,6 +155,14 @@ like(http_get('/return204'), qr!204 No Content!, 'return 204'); like(http_get('/return200'), qr!200 OK!, 'return 200'); + +TODO: { +local $TODO = 'not yet' unless $t->has_version('1.5.6'); + +like(http_get('/return306'), qr!HTTP/1.1 306 !, 'return 306'); + +} + like(http_get('/return405'), qr!HTTP/1.1 405.*body!ms, 'return 405'); like(http_get('/error404return405'), qr!HTTP/1.1 404!, 'error 404 return 405');