Lines 19-25
Link Here
|
19 |
|
19 |
|
20 |
use Modern::Perl; |
20 |
use Modern::Perl; |
21 |
|
21 |
|
22 |
use Test::More tests => 9; |
22 |
use Test::More tests => 10; |
23 |
use Test::Warn; |
23 |
use Test::Warn; |
24 |
use Data::Dumper qw(Dumper); |
24 |
use Data::Dumper qw(Dumper); |
25 |
|
25 |
|
Lines 321-326
subtest 'Auto-increment values tests' => sub {
Link Here
|
321 |
'Build should not overwrite an auto_incr column'; |
321 |
'Build should not overwrite an auto_incr column'; |
322 |
}; |
322 |
}; |
323 |
|
323 |
|
|
|
324 |
subtest 'Date handling' => sub { |
325 |
plan tests => 2; |
326 |
|
327 |
$builder = t::lib::TestBuilder->new; |
328 |
|
329 |
my $patron = $builder->build( { source => 'Borrower' } ); |
330 |
is( length( $patron->{updated_on} ), 19, 'A timestamp column value should be YYYY-MM-DD HH:MM:SS' ); |
331 |
is( length( $patron->{dateofbirth} ), 10, 'A date column value should be YYYY-MM-DD' ); |
332 |
|
333 |
}; |
334 |
|
324 |
$schema->storage->txn_rollback; |
335 |
$schema->storage->txn_rollback; |
325 |
|
336 |
|
326 |
1; |
337 |
1; |