Introduce GOVERNANCE document and empty RESOLUTIONS file.
[dbsrgits/DBIx-Class.git] / t / resultset_overload.t
1 BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) }
2
3 use strict;
4 use warnings;
5
6 use Test::More;
7
8 use DBICTest;
9
10 my $schema = DBICTest->init_schema();
11
12 {
13   my $rs = $schema->resultset("CD")->search({});
14
15   ok $rs->count;
16   is $rs, $rs->count, "resultset as number with results";
17   ok $rs,             "resultset as boolean always true";
18 }
19
20 {
21   my $rs = $schema->resultset("CD")->search({ title => "Does not exist" });
22
23   ok !$rs->count;
24   is $rs, $rs->count, "resultset as number without results";
25   ok $rs,             "resultset as boolean always true";
26 }
27
28 done_testing;