X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Frun%2F21transactions.tl;h=eafc5756d5da2048af01c00b69c70c158b1f578f;hb=af5802f13001e947bd213b06c38fe1afc16c31b1;hp=798a76bb0d81e86cca0c3374984981e5b566f59d;hpb=a62cf8d4bbd7df7082e0fab3d52a45afeeb64293;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/t/run/21transactions.tl b/t/run/21transactions.tl index 798a76b..eafc575 100644 --- a/t/run/21transactions.tl +++ b/t/run/21transactions.tl @@ -1,6 +1,6 @@ sub run_tests { my $schema = shift; -plan tests => 37; +plan tests => 39; my $code = sub { my ($artist, @cd_titles) = @_; @@ -13,6 +13,18 @@ my $code = sub { return $artist->cds->all; }; +# Test checking of parameters +{ + eval { + (ref $schema)->txn_do(sub{}); + }; + like($@, qr/class method/, '$self parameter check ok'); + eval { + $schema->txn_do(''); + }; + like($@, qr/must be a CODE reference/, '$coderef parameter check ok'); +} + # Test successful txn_do() - scalar context { my @titles = map {'txn_do test CD ' . $_} (1..5);