X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F16uri.t;fp=t%2F16uri.t;h=0000000000000000000000000000000000000000;hb=5a8fd7e9d4cca2af0237e1659f061cc64618bfe6;hp=21e2df03aa25e447ce9ac137c8e490940efb54fa;hpb=b76d7db825981c235ff6cfa02b3d393424eaea0e;p=catagits%2FCatalyst-Runtime.git diff --git a/t/16uri.t b/t/16uri.t deleted file mode 100644 index 21e2df0..0000000 --- a/t/16uri.t +++ /dev/null @@ -1,40 +0,0 @@ -package TestApp; - -use Catalyst qw[-Engine=Test]; - -TestApp->action( '!default' => \&default ); -TestApp->action( 'index/a/b' => \&default ); - -sub default { - my ( $self, $c ) = @_; - $c->res->headers->header( 'X-Arguments' => $c->req->arguments ); - $c->res->headers->header( 'X-Base' => $c->req->base ); - $c->res->headers->header( 'X-Path' => $c->req->path ); - $c->res->headers->content_type('text/plain'); - $c->res->output('ok'); -} - -package main; - -use Test::More tests => 6; -use Catalyst::Test 'TestApp'; - -{ - local %ENV; - - my $response = request('/index?a=a&b=b'); - - ok( $response->headers->header('X-Base') eq 'http://localhost/' ); - ok( $response->headers->header('X-Arguments') eq 'index' ); - ok( $response->headers->header('X-Path') eq 'index' ); -} - -{ - local %ENV; - - my $response = request('http://localhost:8080/index/a/b/c'); - - ok( $response->headers->header('X-Base') eq 'http://localhost:8080/' ); - ok( $response->headers->header('X-Arguments') eq 'c' ); - ok( $response->headers->header('X-Path') eq 'index/a/b/c' ); -}