Fail early properly even in the presence of -jN
[dbsrgits/DBIx-Class.git] / t / update / all.t
CommitLineData
8d2da21a 1use strict;
2use warnings;
3
4use Test::More;
5use lib qw(t/lib);
6use DBICTest;
7
8my $schema = DBICTest->init_schema();
9
10my $new_artist = $schema->resultset('Artist')->create({ name => 'new kid behind the block' });
11
12# see how many cds do we have, and relink them all to the new guy
13my $cds = $schema->resultset('CD');
14my $cds_count = $cds->count;
15cmp_ok($cds_count, '>', 0, 'have some cds');
16
17$cds->update_all({ artist => $new_artist });
18
19is( $new_artist->cds->count, $cds_count, 'All cds properly relinked');
20
21done_testing;