rename option to undef_on_null_fk and make it default for belongs_to
[dbsrgits/DBIx-Class-Historic.git] / t / 36datetime.t
CommitLineData
05e8dc0a 1use strict;
2use warnings;
3
4use Test::More;
5use lib qw(t/lib);
6use DBICTest;
7
8eval { require DateTime::Format::MySQL };
9
10plan $@ ? ( skip_all => 'Requires DateTime::Format::MySQL' )
11 : ( tests => 3 );
12
13my $schema = DBICTest->init_schema(
14 no_deploy => 1, # Deploying would cause an early rebless
15);
16
17is(
18 ref $schema->storage, 'DBIx::Class::Storage::DBI',
19 'Starting with generic storage'
20);
21
22# Calling date_time_parser should cause the storage to be reblessed,
23# so that we can pick up datetime_parser_type from subclasses
24
25my $parser = $schema->storage->datetime_parser();
26
27# We're currently expecting a MySQL parser. May change in future.
28is($parser, 'DateTime::Format::MySQL', 'Got expected datetime_parser');
29
30isa_ok($schema->storage, 'DBIx::Class::Storage::DBI::SQLite', 'storage');
31