X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F81transactions.t;h=4a7830f48c09adf798b507e19935e27907660b09;hb=2c2a01a5bf8e194d30b3d9af3b09de21c7dca030;hp=fe3c453704fc2386156d44ce0537f1e49eecbb6c;hpb=d6915f449e2d68ac184d6bc616043fd605913757;p=dbsrgits%2FDBIx-Class.git diff --git a/t/81transactions.t b/t/81transactions.t index fe3c453..4a7830f 100644 --- a/t/81transactions.t +++ b/t/81transactions.t @@ -5,7 +5,7 @@ use Test::More; use lib qw(t/lib); use DBICTest; -my $schema = DBICTest::init_schema(); +my $schema = DBICTest->init_schema(); plan tests => 39; @@ -25,7 +25,7 @@ my $code = sub { eval { (ref $schema)->txn_do(sub{}); }; - like($@, qr/class method/, '$self parameter check ok'); + like($@, qr/storage/, "can't call txn_do without storage"); eval { $schema->txn_do(''); }; @@ -117,7 +117,8 @@ my $fail_code = sub { # Force txn_rollback() to throw an exception no warnings 'redefine'; - local *{"DBIx::Class::Schema::txn_rollback"} = sub{die 'FAILED'}; + no strict 'refs'; + local *{"DBIx::Class::Storage::DBI::SQLite::txn_rollback"} = sub{die 'FAILED'}; eval { $schema->txn_do($fail_code, $artist);