From c507effb17979d428b860716fcf126c26c0efb3c Mon Sep 17 00:00:00 2001 From: Simon Cozens Date: Thu, 9 Dec 2004 09:39:05 +0000 Subject: [PATCH] fix unit tests for Rev 309 git-svn-id: http://svn.maypole.perl.org/Maypole/trunk@312 48953598-375a-da11-a14b-00016c27c3ee --- t/maypole.t | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/t/maypole.t b/t/maypole.t index 4da0de6..4c07d21 100755 --- a/t/maypole.t +++ b/t/maypole.t @@ -1,7 +1,7 @@ #!/usr/bin/perl use strict; use warnings; -use Test::More tests => 107; +use Test::More tests => 108; use Test::MockModule; # module compilation @@ -306,8 +306,7 @@ is($r->path, 'frontpage', '... path() defaults to "frontpage"'); $r->path('/table'); $r->parse_path; is($r->table, 'table', '... parses "table" from the first part of path'); -ok(!defined $r->action && @{$r->args} == 0, - '... leaving "action" undefined, and "args" as empty list, if not present'); +ok(@{$r->args} == 0, '... "args" default to empty list'); $r->path('/table/action'); $r->parse_path; @@ -319,6 +318,11 @@ $r->parse_path; is_deeply($r->args, [qw(arg1 arg2)], '... "args" are populated from remaning components'); +# ... action defaults to index +$r->path('/table'); +$r->parse_path; +is($r->action, 'index', '... action defaults to index'); + # get_template_root() can_ok(Maypole => 'get_template_root'); is(Maypole->get_template_root(), '.', '... returns "."'); -- 2.39.2