From: rkinyon Date: Sun, 17 Dec 2006 04:02:18 +0000 (+0000) Subject: Added another test X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=42dff4d988d79906f948783e6727af66570f49d0;p=dbsrgits%2FDBM-Deep.git Added another test --- diff --git a/t/33_transactions.t b/t/33_transactions.t index 6d135de..77c2fef 100644 --- a/t/33_transactions.t +++ b/t/33_transactions.t @@ -1,5 +1,5 @@ use strict; -use Test::More tests => 69; +use Test::More tests => 71; use Test::Deep; use t::common qw( new_fh ); @@ -52,14 +52,16 @@ ok( $@, "Attempting to begin_work within a transaction throws an error" ); is( $db2->{other_x}, 'foo', "DB2 set other_x within DB1's transaction, so DB2 can see it" ); ok( !exists $db1->{other_x}, "Since other_x was added after the transaction began, DB1 doesn't see it." ); + # Reset to an expected value + $db2->{x} = 'y'; + is( $db1->{x}, 'z', "Within DB1 transaction, DB1's X is istill Z" ); + is( $db2->{x}, 'y', "Within DB1 transaction, DB2's X is now Y" ); + cmp_bag( [ keys %$db1 ], [qw( x z )], "DB1 keys correct" ); cmp_bag( [ keys %$db2 ], [qw( x other_x )], "DB2 keys correct" ); SKIP:{ skip "unfinished yet", 51 } __END__ -# Reset to an expected value -$db2->{x} = 'y'; - $db1->rollback; is( $db1->{x}, 'y', "After rollback, DB1's X is Y" );