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 {
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],