From: Luke Saunders Date: Sun, 11 May 2008 19:03:27 +0000 (+0000) Subject: sanified new multi_create test X-Git-Tag: v0.08240~452 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6ede9177d9ff9ed6a6775922db2798354c07c55e;p=dbsrgits%2FDBIx-Class.git sanified new multi_create test --- diff --git a/t/96multi_create.t b/t/96multi_create.t index 0cbc9bf..356aae6 100644 --- a/t/96multi_create.t +++ b/t/96multi_create.t @@ -198,17 +198,16 @@ is($new_cd->artist->id, 17, 'new id retained okay'); # Test find or create related functionality my $new_artist = $schema->resultset("Artist")->create({ artistid => 18, name => 'larry' }); -my $new_cd_hashref2 = { + +eval { + $schema->resultset("CD")->create({ cdid => 28, title => 'Boogie Wiggle', year => '2007', artist => { artistid => 18, name => 'larry' } - }; - -eval { - $schema->resultset("CD")->create($new_cd_hashref2); + }); }; -is($@, '', 'new artist created without clash'); +is($@, '', 'new cd created without clash on related artist'); # Make sure exceptions from errors in created rels propogate eval {