X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fstorage%2Ftxn.t;fp=t%2Fstorage%2Ftxn.t;h=4c6d50558006ad9a7476f2e06efbb502a4ccfa1a;hb=a6543cfa5769989102af82b5308e23a4ebd3d24d;hp=06af8493700f1e1c515a6d1dad841cb8522bacde;hpb=7154ff351df7c3dad11339bfdb739346cff194e3;p=dbsrgits%2FDBIx-Class.git diff --git a/t/storage/txn.t b/t/storage/txn.t index 06af849..4c6d505 100644 --- a/t/storage/txn.t +++ b/t/storage/txn.t @@ -36,7 +36,7 @@ my $code = sub { for my $want (0,1) { my $schema = DBICTest->init_schema; - is( $schema->storage->{transaction_depth}, 0, 'txn depth starts at 0'); + is( $schema->storage->transaction_depth, 0, 'txn depth starts at 0'); my @titles = map {'txn_do test CD ' . $_} (1..5); my $artist = $schema->resultset('Artist')->find(1); @@ -56,7 +56,7 @@ for my $want (0,1) { title => "txn_do test CD $_", })->first->year, 2006, "new CD $_ year correct") for (1..5); - is( $schema->storage->{transaction_depth}, 0, 'txn depth has been reset'); + is( $schema->storage->transaction_depth, 0, 'txn depth has been reset'); } # Test txn_do() @_ aliasing support @@ -72,7 +72,7 @@ for my $want (0,1) { { my $schema = DBICTest->init_schema; - is( $schema->storage->{transaction_depth}, 0, 'txn depth starts at 0'); + is( $schema->storage->transaction_depth, 0, 'txn depth starts at 0'); my $nested_code = sub { my ($schema, $artist, $code) = @_; @@ -96,7 +96,7 @@ for my $want (0,1) { })->first->year, 2006, qq{nested txn_do CD$_ year ok}) for (1..10); is($artist->cds->count, $count_before+10, 'nested txn_do added all CDs'); - is( $schema->storage->{transaction_depth}, 0, 'txn depth has been reset'); + is( $schema->storage->transaction_depth, 0, 'txn depth has been reset'); } # test nested txn_begin on fresh connection @@ -260,7 +260,7 @@ my $fail_code = sub { # Test failed txn_do() for my $pass (1,2) { - is( $schema->storage->{transaction_depth}, 0, "txn depth starts at 0 (pass $pass)"); + is( $schema->storage->transaction_depth, 0, "txn depth starts at 0 (pass $pass)"); my $artist = $schema->resultset('Artist')->find(3); @@ -274,13 +274,13 @@ my $fail_code = sub { })->first; ok(!defined($cd), qq{failed txn_do didn't change the cds table (pass $pass)}); - is( $schema->storage->{transaction_depth}, 0, "txn depth has been reset (pass $pass)"); + is( $schema->storage->transaction_depth, 0, "txn depth has been reset (pass $pass)"); } # Test failed txn_do() with failed rollback { - is( $schema->storage->{transaction_depth}, 0, 'txn depth starts at 0'); + is( $schema->storage->transaction_depth, 0, 'txn depth starts at 0'); my $artist = $schema->resultset('Artist')->find(3); @@ -322,7 +322,7 @@ my $fail_code = sub { { my $schema = DBICTest->init_schema(); - is( $schema->storage->{transaction_depth}, 0, 'txn depth starts at 0'); + is( $schema->storage->transaction_depth, 0, 'txn depth starts at 0'); my $nested_fail_code = sub { my ($schema, $artist, $code1, $code2) = @_;