X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fstorage%2Ftxn.t;h=efe3641df4c052e2eeea478cb83364c5bdbf975d;hb=68367f1f7fb5dd2d13931ec85c3a9bbb415f8359;hp=4d46e5b9d0261837e50378c016dd6b8ec008a867;hpb=90d7422fc60a3bad71cc67dc20106ef68046664e;p=dbsrgits%2FDBIx-Class.git diff --git a/t/storage/txn.t b/t/storage/txn.t index 4d46e5b..efe3641 100644 --- a/t/storage/txn.t +++ b/t/storage/txn.t @@ -26,9 +26,10 @@ my $code = sub { (ref $schema)->txn_do(sub{}); }, qr/storage/, "can't call txn_do without storage"); - throws_ok ( sub { + throws_ok { $schema->txn_do(''); - }, qr/must be a CODE reference/, '$coderef parameter check ok'); + } qr/\Qrun() requires a coderef to execute as its first argument/, + '$coderef parameter check ok'; } # Test successful txn_do() - scalar/list context @@ -112,7 +113,7 @@ for my $want (0,1) { die "$$ starts in txn!" if $s->storage->transaction_depth != 0; $s->txn_do ( sub { die "$$ not in txn!" if $s->storage->transaction_depth == 0; - $s->storage->dbh->do('SELECT 1') } + $s->storage->dbh->do('SELECT 1') } ); die "$$ did not finish txn!" if $s->storage->transaction_depth != 0; },