# 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 {