is get('/calc/multiply/2/3/4'), 24, 'multiplication';
is get('/calc/unknownthingy/3/4/5'), 'unknown operator', 'unknown operator';
-is get('/calc/add/3/f/5'), 'Bad Request', 'bad request';
+is get('/calc/add/3/f/5'), 'Not found', 'bad request';
like get('/foo/hello'), qr/root controller role/, 'root controller role';
is get('/foo/2/3/add'), 5, 'add two';
is get('/foo/2/3/multiply'), 6, 'multiply two';
-is get('/foo/2/f/add'), 'Bad Request', 'bad request capture args';
+is get('/foo/2/f/add'), 'Not found', 'bad request capture args';
done_testing;
$ctx->error("BAD REQUEST: $error");
}
else {
- $ctx->response->body( 'Bad Request' );
- $ctx->response->status( 400 );
+ $ctx->response->body( 'Not found' );
+ $ctx->response->status( 404 );
}
$ctx->detach;
is get('/modsig/foo/2/3'), 'modifiersignatures/foo modified', 'intended arguments work';
is get('/modsig/foo/2'), 'Page Not Found', 'missing argument leads to 404';
is get('/modsig/foo/2/3/4'), 'Page Not Found', 'one argument too many leads to 404';
-is get('/modsig/foo/a/b'), 'Bad Request', 'invalid arguments lead to bad request';
+is get('/modsig/foo/a/b'), 'Not found', 'invalid arguments lead to bad request';
done_testing;
local *TestApp::debug = sub { 0 };
-is $get->('foo'), 'Bad Request', 'detected action signature error';
-is $subget->('foo'), 'Bad Request', 'detected action signature error (child)';
-is $modget->('foo'), 'Bad Request', 'detected action signature error (modified)';
+is $get->('foo'), 'Not found', 'detected action signature error';
+is $subget->('foo'), 'Not found', 'detected action signature error (child)';
+is $modget->('foo'), 'Not found', 'detected action signature error (modified)';
stderr_like {
is get('/foo/inline_class'), 'HELLO', 'inline classes work as expected';
# error handling
-is get('/foo/wants_integer/butdoesntgetone'), 'Bad Request', 'validation error causes bad request error';
+is get('/foo/wants_integer/butdoesntgetone'), 'Not found', 'validation error causes bad request error';
# fix bug with capture args below under { }
is get('/foo/lower/down/the/param/3/road/5'), 8, 'capture args and block under work together';