enable matching of empty string specs
[catagits/Web-Simple.git] / t / dispatch_parser.t
index b42bb61..8fe2b8e 100644 (file)
@@ -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(