6 use lib "$FindBin::Bin/../lib";
9 use Catalyst::Test 'MyApp::Web';
11 like get('/'), qr/welcome/i, 'root page displays welcome';
12 is get('/ifthisisfoundsomeonehasserioustestnamingissues'), 'Page Not Found', 'default captures 404';
14 is get('/calc/add/3/4/5'), 12, 'addition';
15 is get('/calc/multiply/2/3/4'), 24, 'multiplication';
17 is get('/calc/unknownthingy/3/4/5'), 'unknown operator', 'unknown operator';
18 is get('/calc/add/3/f/5'), 'Not found', 'bad request';
20 like get('/foo/hello'), qr/root controller role/, 'root controller role';
22 is get('/foo/2/3/add'), 5, 'add two';
23 is get('/foo/2/3/multiply'), 6, 'multiply two';
25 is get('/foo/2/f/add'), 'Not found', 'bad request capture args';