1 BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) }
11 $Data::Dumper::Sortkeys = 1;
13 my $schema = DBICTest->init_schema();
17 # bug in 0.07000 caused attr (join/prefetch) to be modifed by search
18 # so we check the search & attr arrays are not modified
19 my $search = { 'artist.name' => 'Caterwauler McCrae' };
20 my $attr = { prefetch => [ qw/artist liner_notes/ ],
21 order_by => 'me.cdid' };
22 my $search_str = Dumper($search);
23 my $attr_str = Dumper($attr);
25 my $rs = $schema->resultset("CD")->search($search, $attr);
27 is(Dumper($search), $search_str, 'Search hash untouched after search()');
28 is(Dumper($attr), $attr_str, 'Attribute hash untouched after search()');
29 cmp_ok($rs + 0, '==', 3, 'Correct number of records returned');