1 BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) }
10 my $schema = DBICTest->init_schema();
12 my $new_artist = $schema->resultset('Artist')->create({ name => 'new kid behind the block' });
14 # see how many cds do we have, and relink them all to the new guy
15 my $cds = $schema->resultset('CD');
16 my $cds_count = $cds->count;
17 cmp_ok($cds_count, '>', 0, 'have some cds');
19 $cds->update_all({ artist => $new_artist });
21 is( $new_artist->cds->count, $cds_count, 'All cds properly relinked');