X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fcdbi-t%2F12-filter.t;h=ecaff02d8b3150ad8dd8f90f2c7a8c6c71c4f02f;hb=96ce20f5436c31ad673bb89370d82f2c073c6e64;hp=a51d34d674e893230f735472fbaa2c3917d2cda6;hpb=9bc6db133eae500322e0e3670d5509d27d208f9e;p=dbsrgits%2FDBIx-Class.git diff --git a/t/cdbi-t/12-filter.t b/t/cdbi-t/12-filter.t index a51d34d..ecaff02 100644 --- a/t/cdbi-t/12-filter.t +++ b/t/cdbi-t/12-filter.t @@ -93,12 +93,11 @@ is $@, '', "No errors"; # Iterators #---------------------------------------------------------------------- -SKIP: { - skip "Compat layer doesn't have iterator support yet", 33; +my $it_class = 'DBIx::Class::ResultSet'; sub test_normal_iterator { my $it = $film->actors; - isa_ok $it, "Class::DBI::Iterator"; + isa_ok $it, $it_class; is $it->count, 3, " - with 3 elements"; my $i = 0; while (my $film = $it->next) { @@ -112,7 +111,7 @@ test_normal_iterator; { Film->has_many(actor_ids => [ Actor => 'id' ]); my $it = $film->actor_ids; - isa_ok $it, "Class::DBI::Iterator"; + isa_ok $it, $it_class; is $it->count, 3, " - with 3 elements"; my $i = 0; while (my $film_id = $it->next) { @@ -125,6 +124,10 @@ test_normal_iterator; # make sure nothing gets clobbered; test_normal_iterator; +SKIP: { + #skip "dbic iterators don't support slice yet", 12; + + { my @acts = $film->actors->slice(1, 2); is @acts, 2, "Slice gives 2 actor"; @@ -146,7 +149,9 @@ test_normal_iterator; package Class::DBI::My::Iterator; -use base 'Class::DBI::Iterator'; +use vars qw/@ISA/; + +@ISA = ($it_class); sub slice { qw/fred barney/ }