X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fprefetch%2Fstandard.t;fp=t%2F77prefetch.t;h=c25e0102017ad168c3e9e614d5c39d95a309c562;hb=e9bd1473080b4aaf94e2be97329d74703d41a353;hp=2b8fb90dc5e77a8dbd5801dd789937af89ea113f;hpb=657c26d64dcad3f863637f678cbe3027adc985ec;p=dbsrgits%2FDBIx-Class.git diff --git a/t/77prefetch.t b/t/prefetch/standard.t similarity index 97% rename from t/77prefetch.t rename to t/prefetch/standard.t index 2b8fb90..c25e010 100644 --- a/t/77prefetch.t +++ b/t/prefetch/standard.t @@ -17,7 +17,7 @@ BEGIN { eval "use DBD::SQLite"; plan $@ ? ( skip_all => 'needs DBD::SQLite for testing' ) - : ( tests => 74 ); + : ( tests => 45 ); } # figure out if we've got a version of sqlite that is older than 3.2.6, in @@ -36,6 +36,13 @@ my $queries = 0; $schema->storage->debugcb(sub { $queries++; }); $schema->storage->debug(1); +my $search = { 'artist.name' => 'Caterwauler McCrae' }; +my $attr = { prefetch => [ qw/artist liner_notes/ ], + order_by => 'me.cdid' }; +my $search_str = Dumper($search); +my $attr_str = Dumper($attr); + +my $rs = $schema->resultset("CD")->search($search, $attr); my @cd = $rs->all; is($cd[0]->title, 'Spoonful of bees', 'First record returned ok');