Commit | Line | Data |
e60dc79f |
1 | use strict; |
f54428ab |
2 | use warnings; |
e60dc79f |
3 | |
4 | use Test::More; |
5 | use lib qw(t/lib); |
6 | use DBICTest; |
7 | |
8 | my $schema = DBICTest->init_schema(); |
9 | |
e60dc79f |
10 | { |
11 | my $rs = $schema->resultset("CD")->search({}); |
12 | |
13 | ok $rs->count; |
14 | is $rs, $rs->count, "resultset as number with results"; |
15 | ok $rs, "resultset as boolean always true"; |
16 | } |
17 | |
18 | { |
19 | my $rs = $schema->resultset("CD")->search({ title => "Does not exist" }); |
f54428ab |
20 | |
e60dc79f |
21 | ok !$rs->count; |
22 | is $rs, $rs->count, "resultset as number without results"; |
23 | ok $rs, "resultset as boolean always true"; |
f54428ab |
24 | } |
25 | |
26 | done_testing; |