Introduce GOVERNANCE document and empty RESOLUTIONS file.
[dbsrgits/DBIx-Class.git] / t / cdbi / retrieve_from_sql_with_limit.t
1 BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) }
2 use DBIx::Class::Optional::Dependencies -skip_all_without => 'cdbicompat';
3
4 use strict;
5 use warnings;
6
7 use Test::More;
8
9 use lib 't/cdbi/testlib';
10 use Film;
11
12 for my $title ("Bad Taste", "Braindead", "Forgotten Silver") {
13     Film->insert({ Title => $title, Director => 'Peter Jackson' });
14 }
15
16 Film->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 }
23
24 done_testing;