-use DBIx::Class::Optional::Dependencies -skip_all_without => 'test_dt';
-
use strict;
use warnings;
use Test::More;
use Test::Exception;
+use Math::BigInt;
use lib qw(t/lib);
use DBICTest;
}
{
- my $formatter = DateTime::Format::Strptime->new(pattern => '%Y');
- my $dt = DateTime->new(year => 2006, month => 06, day => 06,
- formatter => $formatter );
+ my $dt = Math::BigInt->new(2006);
+
my $cd;
lives_ok {
$cd = $cd_rs->search({ year => $dt})->create
use warnings;
use Test::More;
+use Math::BigInt;
use lib qw(t/lib);
use DBICTest;
'extra columns returned by get_inflated_columns without inflatable columns',
);
-SKIP: {
- skip (
- "+select/get_inflated_columns tests need " . DBIx::Class::Optional::Dependencies->req_missing_for ('test_dt'),
- 1
- ) unless DBIx::Class::Optional::Dependencies->req_ok_for ('test_dt');
-
- $schema->class('CD')->inflate_column( 'year',
- { inflate => sub { DateTime->new( year => shift ) },
- deflate => sub { shift->year } }
- );
+# Test object inflation
+$schema->class('CD')->inflate_column( 'year',
+ { inflate => sub { Math::BigInt->new( shift ) },
+ deflate => sub { shift() . '' } }
+);
- $basecols{year} = DateTime->new ( year => $basecols{year} );
+$basecols{year} = Math::BigInt->new( $basecols{year} );
- is_deeply (
- { $plus_rs->first->get_inflated_columns, %todo_rel_inflation_override },
- { %basecols, tr_cnt => $track_cnt },
- 'extra columns returned by get_inflated_columns',
- );
-}
+is_deeply (
+ { $plus_rs->first->get_inflated_columns, %todo_rel_inflation_override },
+ { %basecols, tr_cnt => $track_cnt },
+ 'extra columns returned by get_inflated_columns',
+);
done_testing;