Apache2-Dispatch

 view release on metacpan or  search on metacpan

t/01plain.t  view on Meta::CPAN

use strict;
use warnings FATAL => 'all';

use Apache::Test qw( -withtestmore );
use Apache::TestRequest qw(GET GET_OK);

plan tests => 5, need_lwp;

# Test Apache2::Foo->dispatch_index
my $uri = '/plain';
ok GET_OK $uri;

# Test Apache2::Foo->dispatch_foo
$uri = '/plain/foo';
ok GET_OK $uri;

# Test non-usage of Apache2::Foo::Bar->dispatch_index since
# Apache2::Foo->dispatch_bar does not exist
$uri = '/plain/bar';
my $res = GET $uri;
ok $res->code == 404;

# Test Apache2::Foo::Bar->dispatch_baz
$uri = '/plain/bar/baz';
ok GET_OK $uri;

# Test root location special case
$uri = '/';
ok GET_OK $uri



( run in 1.797 second using v1.01-cache-2.11-cpan-39bf76dae61 )