Institute a central "load this first in testing" package
[dbsrgits/DBIx-Class.git] / t / cdbi / retrieve_from_sql_with_limit.t
CommitLineData
c0329273 1BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) }
83eef562 2use DBIx::Class::Optional::Dependencies -skip_all_without => 'cdbicompat';
3
e60dc79f 4use strict;
4a233f30 5use warnings;
83eef562 6
e60dc79f 7use Test::More;
8
a40329c4 9use lib 't/cdbi/testlib';
10use Film;
e60dc79f 11
12for my $title ("Bad Taste", "Braindead", "Forgotten Silver") {
13 Film->insert({ Title => $title, Director => 'Peter Jackson' });
14}
15
16Film->insert({ Title => "Transformers", Director => "Michael Bay"});
17
18{
19 my @films = Film->retrieve_from_sql(qq[director = "Peter Jackson" LIMIT 2]);
20 is @films, 2, "retrieve_from_sql with LIMIT";
21 is( $_->director, "Peter Jackson" ) for @films;
22}
d9bd5195 23
24done_testing;