From: Peter Rabbitson Date: Sat, 31 Jan 2009 07:41:56 +0000 (+0000) Subject: Rip out todo as per author (it is gone in trunk) X-Git-Tag: v0.08011~11 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=189c18df6da113812cab62810f12152f11b4bf9a;p=dbsrgits%2FDBIx-Class.git Rip out todo as per author (it is gone in trunk) --- diff --git a/t/81transactions.t b/t/81transactions.t index 03a0cf9..9267566 100644 --- a/t/81transactions.t +++ b/t/81transactions.t @@ -8,7 +8,7 @@ use DBICTest; my $schema = DBICTest->init_schema(); -plan tests => 67; +plan tests => 63; my $code = sub { my ($artist, @cd_titles) = @_; @@ -238,31 +238,12 @@ my $fail_code = sub { ok(($err eq ''), 'Pre-connection nested transactions.'); } -# Test txn_rollback with nested -{ - local $TODO = "Work out how this should work"; - my $local_schema = DBICTest->init_schema(); - - my $artist_rs = $local_schema->resultset('Artist'); - throws_ok { - - $local_schema->txn_begin; - $artist_rs->create({ name => 'Test artist rollback 1'}); - $local_schema->txn_begin; - is($local_schema->storage->transaction_depth, 2, "Correct transaction depth"); - $artist_rs->create({ name => 'Test artist rollback 2'}); - $local_schema->txn_rollback; - } qr/Not sure what this should be.... something tho/, "Rolled back okay"; - is($local_schema->storage->transaction_depth, 0, "Correct transaction depth"); - - ok(!$artist_rs->find({ name => 'Test artist rollback 1'}), "Test Artist not created") - || $artist_rs->find({ name => 'Test artist rollback 1'})->delete; -} - # Test txn_scope_guard { local $TODO = "Work out how this should work"; - my $schema = DBICTest->init_schema(); + + # reset schema + $schema = DBICTest->init_schema(); is($schema->storage->transaction_depth, 0, "Correct transaction depth"); my $artist_rs = $schema->resultset('Artist');