Enable pg test disabled god knows why, minor cleanup.
[dbsrgits/DBIx-Class.git] / t / cdbi / max_min_value_of.t
CommitLineData
e60dc79f 1use strict;
2use Test::More;
3
4#----------------------------------------------------------------------
5# Test database failures
6#----------------------------------------------------------------------
7
8BEGIN {
9 eval "use DBIx::Class::CDBICompat;";
10 if ($@) {
11 plan (skip_all => 'Class::Trigger and DBIx::ContextualFetch required');
12 next;
13 }
14 eval "use DBD::SQLite";
15 plan $@ ? (skip_all => 'needs DBD::SQLite for testing') : (tests => 2);
16}
17
50891152 18use lib 't/cdbi/testlib';
e60dc79f 19use Film;
20
21Film->create({
22 title => "Bad Taste",
23 numexplodingsheep => 10,
24});
25
26Film->create({
27 title => "Evil Alien Conquerers",
28 numexplodingsheep => 2,
29});
30
31is( Film->maximum_value_of("numexplodingsheep"), 10 );
32is( Film->minimum_value_of("numexplodingsheep"), 2 );