X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=t%2Fmaypole.t;h=63e7e6585c0a6f97c1c33adc9167c8271ab402ee;hb=fdef988c4b6e0c95310edfed99bcb1bb959a6da4;hp=4da0de6bf3a823ff736a8203467cfebc6443be79;hpb=f9a6b47b3b916585d710eac141003fb8261d9c3c;p=maypole.git diff --git a/t/maypole.t b/t/maypole.t index 4da0de6..63e7e65 100755 --- a/t/maypole.t +++ b/t/maypole.t @@ -23,7 +23,7 @@ ok(Maypole->can('init_done'), 'defines an init_done attribute'); ok(! Maypole->init_done, '... which is false by default'); ok(Maypole->can('view_object'), 'defines a view_object attribute'); is(Maypole->view_object, undef, '... which is undefined'); -ok(Maypole->can('ar'), 'defines an "ar" accessor'); +#ok(Maypole->can('ar'), 'defines an "ar" accessor'); moved to Apache::MVC ok(Maypole->can('params'), 'defines a "params" accessor'); ok(Maypole->can('query'), 'defines a "query" accessor'); ok(Maypole->can('objects'), 'defines an "objects" accessor'); @@ -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 "."');