Commit | Line | Data |
70350518 |
1 | use strict; |
2 | use warnings; |
3 | |
4 | use Test::More; |
5 | use lib qw(t/lib); |
6 | use DBICTest; |
7 | |
8 | my $schema = DBICTest::init_schema(); |
2bb7b40b |
9 | |
10 | plan tests => 5; |
11 | |
58d387fe |
12 | my $cd; |
2bb7b40b |
13 | my $rs = $cd = $schema->resultset("CD")->search({}); |
14 | |
15 | my $rs_title = $rs->get_column('title'); |
16 | my $rs_year = $rs->get_column('year'); |
17 | |
18 | is($rs_title->next, 'Spoonful of bees', "next okay"); |
19 | |
20 | my @all = $rs_title->all; |
21 | cmp_ok(scalar @all, '==', 5, "five titles returned"); |
22 | |
23 | cmp_ok($rs_year->max, '==', 2001, "max okay for year"); |
24 | is($rs_title->min, 'Caterwaulin\' Blues', "min okay for title"); |
25 | |
26 | cmp_ok($rs_year->sum, '==', 9996, "three artists returned"); |
27 | |