680a3f1b1e7bba3a50704a1e15ab0e1e802cb409
[dbsrgits/DBIx-Class.git] / t / inflate / datetime_missing_deps.t
1 use strict;
2 use warnings;
3
4 use Test::More;
5 use Test::Exception;
6 use lib qw(t/lib);
7 use DBICTest;
8
9 my $no_class = '_DBICTEST_NONEXISTENT_CLASS_';
10
11 my $schema = DBICTest->init_schema();
12 $schema->storage->datetime_parser_type($no_class);
13
14 my $event = $schema->resultset('Event')->find(1);
15
16 # test that datetime_undef_if_invalid does not eat the missing dep exception
17 throws_ok {
18   my $dt = $event->starts_at;
19 } qr{Can't locate ${no_class}\.pm};
20
21 done_testing;