X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F96multi_create.t;h=e27c9cd9f4c0773872ceb040040bbd5395c23311;hb=f0bb26f3f0d994041c6fb4382afef87293af2cc2;hp=356aae65a9d33c55d51bcce5ac4b21663ddd96dd;hpb=6ede9177d9ff9ed6a6775922db2798354c07c55e;p=dbsrgits%2FDBIx-Class.git diff --git a/t/96multi_create.t b/t/96multi_create.t index 356aae6..e27c9cd 100644 --- a/t/96multi_create.t +++ b/t/96multi_create.t @@ -51,16 +51,16 @@ my $newartist2 = $schema->resultset('Artist')->find_or_create({ name => 'Fred 3' is($newartist2->name, 'Fred 3', 'Created new artist with cds via find_or_create'); -my $artist2 = $schema->resultset('Artist')->create({ artistid => 1000, +my $artist2 = $schema->resultset('Artist')->create({ name => 'Fred 3', cds => [ - { artist => 1000, + { title => 'Music to code by', year => 2007, }, ], cds_unordered => [ - { artist => 1000, + { title => 'Music to code by', year => 2007, }, @@ -202,7 +202,7 @@ my $new_artist = $schema->resultset("Artist")->create({ artistid => 18, name => eval { $schema->resultset("CD")->create({ cdid => 28, - title => 'Boogie Wiggle', + title => 'Boogie Wiggle', year => '2007', artist => { artistid => 18, name => 'larry' } }); @@ -211,9 +211,9 @@ is($@, '', 'new cd created without clash on related artist'); # Make sure exceptions from errors in created rels propogate eval { - my $t = $schema->resultset("Track")->new({}); - $t->cd($t->new_related('cd', { artist => undef } ) ); - $t->{_rel_in_storage} = 0; + my $t = $schema->resultset("Track")->new({ cd => { artist => undef } }); + #$t->cd($t->new_related('cd', { artist => undef } ) ); + #$t->{_rel_in_storage} = 0; $t->insert; }; like($@, qr/cd.artist may not be NULL/, "Exception propogated properly");