or plan skip_all =>
"DBD::SQLite is required for this test";
- eval { require DBIx::Class }
- or plan skip_all =>
- "DBIx::Class is required for this test";
-
eval { require Catalyst::Plugin::Authorization::Roles }
or plan skip_all =>
"Catalyst::Plugin::Authorization::Roles is required for this test";
- plan tests => 8;
+ plan tests => 10;
use TestApp;
TestApp->config( {
ok( my $res = request('http://localhost/user_login?username=joeuser&password=hackme&detach=is_admin_user'), 'request ok' );
is( $res->content, 'failed', 'user is not an admin and a user' );
}
+
+# test superuser role override fails (not enabled)
+{
+ ok( my $res = request('http://localhost/user_login?username=graeme&password=supersecret&detach=is_admin'), 'request ok' );
+ is( $res->content, 'failed', 'user is not an admin' );
+}