Option to disable the charging of the setup fee while a package is suspended.
[freeside.git] / install / 5.005 / DBD-Pg-1.22-fixvercmp / t / 07reuse.t
1 use strict;
2 use DBI;
3 use Test::More;
4
5 if (defined $ENV{DBI_DSN}) {
6   plan tests => 3;
7 } else {
8   plan skip_all => 'cannot test without DB info';
9 }
10
11 my $dbh = DBI->connect($ENV{DBI_DSN}, $ENV{DBI_USER}, $ENV{DBI_PASS},
12                        {RaiseError => 1, PrintError => 0, AutoCommit => 0}
13                       );
14 ok(defined $dbh,
15    'connect with transaction'
16   );
17
18 my $sth = $dbh->prepare(q{SELECT * FROM test});
19 ok($dbh->disconnect(),
20    'disconnect with un-finished statement'
21   );
22
23 eval {
24   $sth->execute();
25 };
26 ok($@,
27    'execute on disconnected statement'
28   );