Added Oracle LIMIT tests
[dbsrgits/DBIx-Class.git] / t / 11mysql.t
CommitLineData
08aa0414 1use lib qw(lib t/lib);
2use DBICTest::Schema;
3
4use Test::More;
5
6my ($dsn, $user, $pass) = @ENV{map { "DBICTEST_MYSQL_${_}" } qw/DSN USER PASS/};
7
cba994a1 8#warn "$dsn $user $pass";
08aa0414 9
10plan skip_all, 'Set $ENV{DBICTEST_MYSQL_DSN}, _USER and _PASS to run this test'
11 unless ($dsn && $user);
12
13plan tests => 1;
14
15DBICTest::Schema->compose_connection('MySQLTest' => $dsn, $user, $pass);
16
17my $dbh = MySQLTest::Artist->storage->dbh;
18
19$dbh->do("DROP TABLE IF EXISTS artist;");
20
21$dbh->do("CREATE TABLE artist (artistid INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY, name VARCHAR(255));");
22
23#'dbi:mysql:host=localhost;database=dbic_test', 'dbic_test', '');
24
25MySQLTest::Artist->load_components('PK::Auto::MySQL');
26
27my $new = MySQLTest::Artist->create({ name => 'foo' });
28
29ok($new->artistid, "Auto-PK worked");
30
311;