X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fdispatch_parser.t;h=8fe2b8e0169a490edd587446f89e13897dedead0;hb=59ccc1e85596c73f96fce832d900fe72a764f230;hp=b42bb61dbde91c08b34184af351f7fa133407e38;hpb=15e679c14bf1802ecc67e8f33b8174d277be9290;p=catagits%2FWeb-Simple.git diff --git a/t/dispatch_parser.t b/t/dispatch_parser.t index b42bb61..8fe2b8e 100644 --- a/t/dispatch_parser.t +++ b/t/dispatch_parser.t @@ -8,6 +8,22 @@ use Web::Dispatch::Parser; my $dp = Web::Dispatch::Parser->new; { + my $all = $dp->parse(''); + + is_deeply( + [ $all->({ REQUEST_METHOD => 'GET' }) ], + [ {} ], + 'GET matches' + ); + + is_deeply( + [ $all->({ REQUEST_METHOD => 'POST' }) ], + [ {} ], + 'POST matches' + ); +}; + +{ my $get = $dp->parse('GET'); is_deeply(