+use warnings;
+use strict;
+
+use Test::More;
+
+use lib qw(t/lib);
+use DBICTest;
+
package My::Schema::Result::User;
use strict;
1;
package main;
-
-use lib qw(t/lib);
-use DBICTest;
-
-use Test::More;
-
my $user_data = {
email => 'someguy@place.com',
password => 'pass1',
admin => 1
};
-ok( my $schema = My::Schema->connection('dbi:SQLite:dbname=:memory:') );
+ok( my $schema = My::Schema->connect(DBICTest->_database) );
ok(
$schema->storage->dbh->do(
is( ref $user, 'My::Schema::Result::User' );
is( ref $admin, 'My::Schema::Result::User::Admin' );
-
}
my $user = $schema->resultset('User')->single($user_data);