4 use Test::More tests => 5;
10 my $schema = DBICTest->init_schema(
14 ok $schema->connection(
17 on_connect_do => ['CREATE TABLE TEST_empty (id INTEGER)'],
19 [\&check_exists, 'DROP TABLE TEST_empty', \&check_dropped],
23 ok $schema->storage->dbh->do('SELECT 1 FROM TEST_empty'), 'on_connect_do() worked';
24 eval { $schema->storage->dbh->do('SELECT 1 FROM TEST_nonexistent'); };
25 ok $@, 'Searching for nonexistent table dies';
27 $schema->storage->disconnect();
31 ok $storage->dbh->do('SELECT 1 FROM TEST_empty'), 'Table still exists';
36 eval { $storage->dbh->do('SELECT 1 FROM TEST_empty'); };
37 ok $@, 'Reading from dropped table fails';