8 $Data::Dumper::Sortkeys = 1;
10 my $schema = DBICTest->init_schema();
14 # bug in 0.07000 caused attr (join/prefetch) to be modifed by search
15 # so we check the search & attr arrays are not modified
16 my $search = { 'artist.name' => 'Caterwauler McCrae' };
17 my $attr = { prefetch => [ qw/artist liner_notes/ ],
18 order_by => 'me.cdid' };
19 my $search_str = Dumper($search);
20 my $attr_str = Dumper($attr);
22 my $rs = $schema->resultset("CD")->search($search, $attr);
24 is(Dumper($search), $search_str, 'Search hash untouched after search()');
25 is(Dumper($attr), $attr_str, 'Attribute hash untouched after search()');
26 cmp_ok($rs + 0, '==', 3, 'Correct number of records returned');