Skip to content

Commit

Permalink
test tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Jun 3, 2012
1 parent 33ce157 commit fc9e3f6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions t/mojolicious/lite_app.t
Expand Up @@ -9,7 +9,7 @@ BEGIN {
$ENV{MOJO_REACTOR} = 'Mojo::Reactor::Poll';
}

use Test::More tests => 688;
use Test::More tests => 691;

# "Wait you're the only friend I have...
# You really want a robot for a friend?
Expand Down Expand Up @@ -868,12 +868,12 @@ $t->get_ok('/.html')->status_is(200)->header_is(Server => 'Mojolicious (Perl)')

# GET /0 ("X-Forwarded-For")
$t->get_ok('/0', {'X-Forwarded-For' => '192.0.2.2, 192.0.2.1'})->status_is(200)
->content_like(qr!^http\://localhost\:\d+/0!)
->content_like(qr!^http\://localhost\:\d+/0-!)->content_like(qr/-0$/)
->content_unlike(qr!-192\.0\.2\.1-0$!);

# GET /0 ("X-Forwarded-HTTPS")
$t->get_ok('/0', {'X-Forwarded-HTTPS' => 1})->status_is(200)
->content_like(qr!^http\://localhost\:\d+/0!)
->content_like(qr!^http\://localhost\:\d+/0-!)->content_like(qr/-0$/)
->content_unlike(qr!-192\.0\.2\.1-0$!);

# GET /0 (reverse proxy with "X-Forwarded-For")
Expand All @@ -888,7 +888,7 @@ $t->get_ok('/0', {'X-Forwarded-HTTPS' => 1})->status_is(200)
{
local $ENV{MOJO_REVERSE_PROXY} = 1;
$t->get_ok('/0', {'X-Forwarded-HTTPS' => 1})->status_is(200)
->content_like(qr!^https\://localhost\:\d+/0!)
->content_like(qr!^https\://localhost\:\d+/0-!)->content_like(qr/-0$/)
->content_unlike(qr!-192\.0\.2\.1-0$!);
}

Expand Down

0 comments on commit fc9e3f6

Please sign in to comment.