Introduce GOVERNANCE document and empty RESOLUTIONS file.
[dbsrgits/DBIx-Class.git] / t / update / all.t
1 BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) }
2
3 use strict;
4 use warnings;
5
6 use Test::More;
7
8 use DBICTest;
9
10 my $schema = DBICTest->init_schema();
11
12 my $new_artist = $schema->resultset('Artist')->create({ name => 'new kid behind the block' });
13
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');
18
19 $cds->update_all({ artist => $new_artist });
20
21 is( $new_artist->cds->count, $cds_count, 'All cds properly relinked');
22
23 done_testing;