9 my $schema = DBICTest->init_schema();
11 my $orig_debug = $schema->storage->debug;
16 eval "use DBD::SQLite";
18 ? ( skip_all => 'needs DBD::SQLite for testing' )
22 # bug in 0.07000 caused attr (join/prefetch) to be modifed by search
23 # so we check the search & attr arrays are not modified
24 my $search = { 'artist.name' => 'Caterwauler McCrae' };
25 my $attr = { prefetch => [ qw/artist liner_notes/ ],
26 order_by => 'me.cdid' };
27 my $search_str = Dumper($search);
28 my $attr_str = Dumper($attr);
30 my $rs = $schema->resultset("CD")->search($search, $attr);
32 is(Dumper($search), $search_str, 'Search hash untouched after search()');
33 is(Dumper($attr), $attr_str, 'Attribute hash untouched after search()');
34 cmp_ok($rs + 0, '==', 3, 'Correct number of records returned');