X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fcdbi-abstract%2Fsearch_where.t;h=3a89e3c1e20f786bc1d866285d78962249687417;hb=d37c21dc1dff22a2c154aa74a46c8f3076df994c;hp=3161299c4390cee8d42a9c30f64942dd6972f0d1;hpb=9cf15d4b69b6171e139ea012184334bc9f6f6f54;p=dbsrgits%2FDBIx-Class.git diff --git a/t/cdbi-abstract/search_where.t b/t/cdbi-abstract/search_where.t index 3161299..3a89e3c 100644 --- a/t/cdbi-abstract/search_where.t +++ b/t/cdbi-abstract/search_where.t @@ -12,7 +12,7 @@ BEGIN { next; } eval "use DBD::SQLite"; - plan $@ ? (skip_all => 'needs DBD::SQLite for testing') : (tests => 9); + plan $@ ? (skip_all => 'needs DBD::SQLite for testing') : (tests => 10); } INIT { @@ -28,6 +28,13 @@ my $superman = Film->search_where( Title => "Superman" ); is $superman->next->Title, "Superman", "search_where() as iterator"; is $superman->next, undef; +{ + my @supers = Film->search_where({ title => { 'like' => 'Super%' } }); + is_deeply [sort map $_->Title, @supers], + [sort ("Super Fuzz", "Superman")], 'like'; +} + + my @all = Film->search_where({}, { order_by => "Title ASC" }); is_deeply ["Batman", "Super Fuzz", "Superman"], [map $_->Title, @all],