[Bast-commits] r7358 - DBIx-Class/0.08/trunk/t/prefetch
ribasushi at dev.catalyst.perl.org
ribasushi at dev.catalyst.perl.org
Fri Aug 21 09:18:44 GMT 2009
Author: ribasushi
Date: 2009-08-21 09:18:43 +0000 (Fri, 21 Aug 2009)
New Revision: 7358
Modified:
DBIx-Class/0.08/trunk/t/prefetch/multiple_hasmany.t
Log:
Because prefetch uses the cache system, it is not possible to set HRI on a prefetched rs without upsetting the tests - don't compare
Modified: DBIx-Class/0.08/trunk/t/prefetch/multiple_hasmany.t
===================================================================
--- DBIx-Class/0.08/trunk/t/prefetch/multiple_hasmany.t 2009-08-21 04:53:53 UTC (rev 7357)
+++ DBIx-Class/0.08/trunk/t/prefetch/multiple_hasmany.t 2009-08-21 09:18:43 UTC (rev 7358)
@@ -48,18 +48,13 @@
$schema->storage->debug ($sdebug);
is($pr_tracks_count, $tracks_count, 'equal count of prefetched relations over several same level has_many\'s (1 -> M + M)');
+ is ($pr_tracks_rs->all, $tracks_rs->all, 'equal amount of objects returned with and without prefetch over several same level has_many\'s (1 -> M + M)');
- for ($pr_tracks_rs, $tracks_rs) {
- $_->result_class ('DBIx::Class::ResultClass::HashRefInflator');
- }
-
- is_deeply ([$pr_tracks_rs->all], [$tracks_rs->all], 'same structure returned with and without prefetch over several same level has_many\'s (1 -> M + M)');
-
#( M -> 1 -> M + M )
my $note_rs = $schema->resultset('LinerNotes')->search ({ notes => 'Buy Whiskey!' });
my $pr_note_rs = $note_rs->search ({}, {
prefetch => {
- cd => [qw/tags tracks/]
+ cd => [qw/tracks tags/]
},
});
@@ -86,12 +81,7 @@
$schema->storage->debug ($sdebug);
is($pr_tags_count, $tags_count, 'equal count of prefetched relations over several same level has_many\'s (M -> 1 -> M + M)');
-
- for ($pr_tags_rs, $tags_rs) {
- $_->result_class ('DBIx::Class::ResultClass::HashRefInflator');
- }
-
- is_deeply ([$pr_tags_rs->all], [$tags_rs->all], 'same structure returned with and without prefetch over several same level has_many\'s (M -> 1 -> M + M)');
+ is($pr_tags_rs->all, $tags_rs->all, 'equal amount of objects with and without prefetch over several same level has_many\'s (M -> 1 -> M + M)');
}
# remove this closure once the TODO above is working
More information about the Bast-commits
mailing list