X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fdispatch_parser.t;h=d0b8db46d03a37c18331c6dcad3739da80f9ce52;hb=aaa598e6eb2a284ce1984715e6caade20590da34;hp=b42bb61dbde91c08b34184af351f7fa133407e38;hpb=15e679c14bf1802ecc67e8f33b8174d277be9290;p=catagits%2FWeb-Simple.git diff --git a/t/dispatch_parser.t b/t/dispatch_parser.t index b42bb61..d0b8db4 100644 --- a/t/dispatch_parser.t +++ b/t/dispatch_parser.t @@ -7,6 +7,27 @@ use Web::Dispatch::Parser; my $dp = Web::Dispatch::Parser->new; +TODO: { + local $TODO = 'according to the synopsis this should work'; + my $all = eval { + $dp->parse(''); + }; + ok $all; + eval { + is_deeply( + [ $all->({ REQUEST_METHOD => 'GET' }) ], + [ {} ], + 'GET matches' + ); + + is_deeply( + [ $all->({ REQUEST_METHOD => 'POST' }) ], + [ {} ], + 'POST matches' + ); + }; +}; + { my $get = $dp->parse('GET');