X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fcdbi-t%2F12-filter.t;h=979ad56846e1325369c65b7d7f8ab510a4fe9e6e;hb=331a564;hp=7132a54da4ea2560c5ce507a134a20a8fa8a5e26;hpb=525035fb51a62462fc675dcb2f25900dcb46f412;p=dbsrgits%2FDBIx-Class.git diff --git a/t/cdbi-t/12-filter.t b/t/cdbi-t/12-filter.t index 7132a54..979ad56 100644 --- a/t/cdbi-t/12-filter.t +++ b/t/cdbi-t/12-filter.t @@ -2,8 +2,13 @@ use strict; use Test::More; BEGIN { - eval "use DBD::SQLite"; - plan $@ ? (skip_all => 'needs DBD::SQLite for testing') : (tests => 50); + eval "use DBIx::Class::CDBICompat;"; + if ($@) { + plan (skip_all => 'Class::Trigger and DBIx::ContextualFetch required'); + next; + } + eval "use DBD::SQLite"; + plan $@ ? (skip_all => 'needs DBD::SQLite for testing') : (tests => 50); } use lib 't/testlib'; @@ -93,7 +98,7 @@ is $@, '', "No errors"; # Iterators #---------------------------------------------------------------------- -my $it_class = 'DBIx::Class::Cursor'; +my $it_class = 'DBIx::Class::ResultSet'; sub test_normal_iterator { my $it = $film->actors; @@ -159,6 +164,8 @@ package main; Actor->iterator_class('Class::DBI::My::Iterator'); +delete $film->{related_resultsets}; + { my @acts = $film->actors->slice(1, 2); is @acts, 2, "Slice gives 2 results";