X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F72pg.t;h=0003205032924eb854df05c97677e752fafa6b6b;hb=34a9e8a0a9f44db29f4faabd7a37d40a58ed0821;hp=512b7b9bbd795cf51eca2287bb6365a44d0640c1;hpb=360dc8a5c8fce8e2fac43970ef8a5e65ba1e5a16;p=dbsrgits%2FDBIx-Class.git diff --git a/t/72pg.t b/t/72pg.t index 512b7b9..0003205 100644 --- a/t/72pg.t +++ b/t/72pg.t @@ -4,7 +4,6 @@ use warnings; use Test::More; use lib qw(t/lib); use DBICTest; -use DBICTest::Stats; { package DBICTest::Schema::Casecheck; @@ -28,10 +27,10 @@ my ($dsn, $user, $pass) = @ENV{map { "DBICTEST_PG_${_}" } qw/DSN USER PASS/}; plan skip_all => 'Set $ENV{DBICTEST_PG_DSN}, _USER and _PASS to run this test' . ' (note: creates and drops tables named artist and casecheck!)' unless ($dsn && $user); -plan tests => 34; +plan tests => 32; DBICTest::Schema->load_classes( 'Casecheck' ); -my $schema = DBICTest::Schema->connect($dsn, $user, $pass, { auto_savepoint => 1}); +my $schema = DBICTest::Schema->connect($dsn, $user, $pass); # Check that datetime_parser returns correctly before we explicitly connect. SKIP: { @@ -46,10 +45,6 @@ SKIP: { } my $dbh = $schema->storage->dbh; -my $stats = new DBICTest::Stats(); -$schema->storage->debugobj($stats); -$schema->storage->debug(1); - $schema->source("Artist")->name("testschema.artist"); $schema->source("SequenceTest")->name("testschema.sequence_test"); $dbh->do("CREATE SCHEMA testschema;"); @@ -188,8 +183,8 @@ SKIP: { SKIP: { skip "Oracle Auto-PK tests are broken", 16; + # test auto increment using sequences WITHOUT triggers - for (1..5) { my $st = $schema->resultset('SequenceTest')->create({ name => 'foo' }); is($st->pkid1, $_, "Oracle Auto-PK without trigger: First primary key"); @@ -200,28 +195,6 @@ SKIP: { is($st->pkid1, 55, "Oracle Auto-PK without trigger: First primary key set manually"); } -$schema->txn_begin; - -my $arty = $schema->resultset('Artist')->find(1); - -my $name = $arty->name; - -$schema->storage->_svp_begin ("mysavepoint"); - -$arty->update({ name => 'Jheephizzy' }); - -$arty->discard_changes; - -cmp_ok($arty->name, 'eq', 'Jheephizzy', 'Name changed'); - -$schema->storage->_svp_rollback ("mysavepoint"); - -$arty->discard_changes; - -cmp_ok($arty->name, 'eq', $name, 'Name rolled back'); - -$schema->txn_commit; - END { if($dbh) { $dbh->do("DROP TABLE testschema.artist;");