Make "Invalid username" error message customizable
[plack-middleware-auth-complex.git] / t / Plack-Middleware-Auth-Complex.t
index eae34b7e0d36de75dd52916b044b291db997e151..72de5723e6c1db4605066a2992abef11093e3d8d 100644 (file)
@@ -53,7 +53,7 @@ test_psgi $app, sub {
        is_http $cb->(GET '/', Authorization => 'Hello'), 200, 'Anon', 'GET / with invalid Authorization';
        is_http $cb->(GET '/', Authorization => $auth), 200, 'Anon', 'GET / with bad user/pass';
        is_http $cb->(POST '/register'), 400, 'Missing parameter username', 'POST /register with no parameters';
-       is_http $cb->(POST '/register', [@register_args, username => '???'] ), 400, 'Username must match (?^as:^\w{2,20}$)', 'POST /register with bad username';
+       is_http $cb->(POST '/register', [@register_args, username => '???'] ), 400, 'Invalid username', 'POST /register with bad username';
        is_http $cb->(POST '/register', [@register_args, password => '???'] ), 400, 'The two passwords do not match', 'POST /register with different passwords';
        is_http $cb->(POST '/register', \@register_args), 200, 'Registered successfully', 'POST /register with correct parameters',
        is_http $cb->(POST '/register', \@register_args), 400, 'Username already in use', 'POST /register with existing user',
This page took 0.009325 seconds and 4 git commands to generate.