X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fmulti_create%2Fstandard.t;h=54cf04ee3181f92cd9389b528f10f9e177714482;hb=957f6ffec741bcf81297f996ca5cbebba29852c5;hp=6c1efd816577afbf98c7c8d42301defbb756528d;hpb=ed5550d36c5771dfb5492b23127f8af9e38254d4;p=dbsrgits%2FDBIx-Class.git diff --git a/t/multi_create/standard.t b/t/multi_create/standard.t index 6c1efd8..54cf04e 100644 --- a/t/multi_create/standard.t +++ b/t/multi_create/standard.t @@ -3,11 +3,10 @@ use warnings; use Test::More; use Test::Exception; +use Test::Warn; use lib qw(t/lib); use DBICTest; -plan tests => 91; - my $schema = DBICTest->init_schema(); lives_ok ( sub { @@ -403,8 +402,11 @@ lives_ok ( sub { $kurt_cobain->{cds} = [ $in_utero ]; + warnings_exist { + $schema->resultset('Artist')->populate([ $kurt_cobain ]); + } qr/\QFast-path populate() with supplied related objects is not possible/; + - $schema->resultset('Artist')->populate([ $kurt_cobain ]); # %) my $artist = $schema->resultset('Artist')->find({name => 'Kurt Cobain'}); is($artist->name, 'Kurt Cobain', 'Artist insertion ok'); @@ -468,4 +470,4 @@ lives_ok ( sub { is ($m2m_cd->first->producers->first->name, 'Cowboy Neal', 'Correct producer row created'); }, 'Test multi create over many_to_many'); -1; +done_testing;