This commit was generated by cvs2svn to compensate for changes in r3921,
[freeside.git] / install / 5.005 / DBD-Pg-1.22-fixvercmp / t / 01connect.t
1 use strict;
2 use DBI;
3 use Test::More;
4
5 if (defined $ENV{DBI_DSN}) {
6   plan tests => 2;
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, AutoCommit => 0}
13                       );
14
15 ok((defined $dbh and $dbh->disconnect()),
16    'connect with transaction'
17   );
18
19 undef $dbh;
20 $dbh = DBI->connect($ENV{DBI_DSN}, $ENV{DBI_USER}, $ENV{DBI_PASS},
21                     {RaiseError => 1, AutoCommit => 1});
22
23 ok((defined $dbh and $dbh->disconnect()),
24    'connect without transaction'
25   );
26