Some cleanup
[dbsrgits/DBIx-Class.git] / t / resultset_overload.t
CommitLineData
e60dc79f 1use strict;
2use warnings;
3
4use Test::More;
5use lib qw(t/lib);
6use DBICTest;
7
8my $schema = DBICTest->init_schema();
9
10plan tests => 6;
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}