Revision history for Catalyst-Plugin-Authentication-Store-DBIx-Class
- * Return undef if there isn't a user. This will cause an exception
+ * Fix RT#82944 - test fails on perl >= 5.17.3
+
+ * Return undef if there isn't a user. This will cause an exception
but a more helpful exception (probably from DBIC) than the inability
to call a method in this code.
plan tests => 19;
- $ENV{TESTAPP_CONFIG} = {
+ use TestApp;
+ TestApp->config( {
name => 'TestApp',
authentication => {
default_realm => "users",
},
},
},
- };
+ } );
- $ENV{TESTAPP_PLUGINS} = [
+ TestApp->setup(
qw/Authentication/
- ];
+ );
}
use Catalyst::Test 'TestApp';
{
- $ENV{TESTAPP_CONFIG}->{authentication}->{realms}->{users}->{store}->{user_model} = 'Nonexistent::Class';
+ TestApp->config->{authentication}->{realms}->{users}->{store}->{user_model} = 'Nonexistent::Class';
my $res = request('http://localhost/user_login?username=joeuser&password=hackme');
like( $res->content, qr/\$\Qc->model('Nonexistent::Class') did not return a resultset. Did you set user_model correctly?/, 'test for wrong user_class' );
}
plan tests => 8;
- $ENV{TESTAPP_CONFIG} = {
+ use TestApp;
+ TestApp->config( {
name => 'TestApp',
authentication => {
default_realm => "users",
},
},
},
- };
+ } );
- $ENV{TESTAPP_PLUGINS} = [
+ TestApp->setup(
qw/Authentication
Session
Session::Store::Dummy
Session::State::Cookie
/
- ];
+ );
}
use Test::WWW::Mechanize::Catalyst 'TestApp';
plan tests => 8;
- $ENV{TESTAPP_CONFIG} = {
+ use TestApp;
+ TestApp->config( {
name => 'TestApp',
authentication => {
default_realm => "users",
},
},
},
- };
+ } );
- $ENV{TESTAPP_PLUGINS} = [
+ TestApp->setup(
qw/Authentication
Authorization::Roles
/
- ];
+ );
}
use Catalyst::Test 'TestApp';
plan tests => 8;
- $ENV{TESTAPP_CONFIG} = {
+ use TestApp;
+ TestApp->config( {
name => 'TestApp',
authentication => {
default_realm => "users",
},
},
},
- };
+ } );
- $ENV{TESTAPP_PLUGINS} = [
+ TestApp->setup(
qw/Authentication
Authorization::Roles
/
- ];
+ );
}
use Catalyst::Test 'TestApp';
plan tests => 8;
- $ENV{TESTAPP_CONFIG} = {
+ use TestApp;
+ TestApp->config( {
name => 'TestApp',
authentication => {
default_realm => "users",
},
},
},
- };
+ } );
- $ENV{TESTAPP_PLUGINS} = [
+ TestApp->setup(
qw/Authentication
Session
Session::Store::Dummy
Session::State::Cookie
/
- ];
+ );
}
use Test::WWW::Mechanize::Catalyst 'TestApp';
plan tests => 8;
- $ENV{TESTAPP_CONFIG} = {
+ use TestApp;
+ TestApp->config( {
name => 'TestApp',
'Plugin::Authentication' => {
default => {
password_type => 'clear'
}
}
- };
+ } );
- $ENV{TESTAPP_PLUGINS} = [
+ TestApp->setup(
qw/Authentication
Authorization::Roles
/
- ];
+ );
}
use Catalyst::Test 'TestApp';
plan tests => 8;
- $ENV{TESTAPP_CONFIG} = {
+ use TestApp;
+ TestApp->config( {
name => 'TestApp',
'Plugin::Authentication' => {
default => {
}
}
- };
+ } );
- $ENV{TESTAPP_PLUGINS} = [
+ TestApp->setup(
qw/Authentication
Authorization::Roles
/
- ];
+ );
}
use Catalyst::Test 'TestApp';
plan tests => 4;
- $ENV{TESTAPP_CONFIG} = {
+ use TestApp;
+ TestApp->config( {
name => 'TestApp',
authentication => {
default_realm => "users",
},
},
},
- };
+ } );
- $ENV{TESTAPP_PLUGINS} = [
+ TestApp->setup(
qw/Authentication
Session
Session::Store::Dummy
Session::State::Cookie
/
- ];
+ );
}
use Test::WWW::Mechanize::Catalyst 'TestApp';
use Catalyst;
use Data::Dumper;
-TestApp->config( $ENV{TESTAPP_CONFIG} );
-
-TestApp->setup( @{$ENV{TESTAPP_PLUGINS}} );
-
1;