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