use Test::More;
-plan tests => 29;
+plan tests => 33;
use_ok('TestApp');
"/action/regexp/foo/123",
"Regex action interpolates captures correctly");
+my $regex_action_bs = $dispatcher->get_action_by_path(
+ '/action/regexp/one_backslashes'
+ );
+
+ok(!defined($dispatcher->uri_for_action($regex_action_bs)),
+ "Regex action without captures returns undef");
+
+ok(!defined($dispatcher->uri_for_action($regex_action_bs, [ 1, 2, 3 ])),
+ "Regex action with too many captures returns undef");
+
+is($dispatcher->uri_for_action($regex_action_bs, [ 'foo', 123 ]),
+ "/action/regexp/foo/123.html",
+ "Regex action interpolates captures correctly");
+
+
#
# Index Action
#
namespace => 'yada',
} );
+is($context->uri_for($context->controller('Action')),
+ "http://127.0.0.1/foo/yada/action/",
+ "uri_for a controller");
+
is($context->uri_for($path_action),
"http://127.0.0.1/foo/action/relative/relative",
"uri_for correct for path action");