moved code to ::DBI::MSSQL and added DT inflation test
[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
40f75181 8eval { require DateTime::Format::SQLite };
9plan $@ ? ( skip_all => 'Requires DateTime::Format::SQLite' )
05e8dc0a 10 : ( tests => 3 );
11
12my $schema = DBICTest->init_schema(
13 no_deploy => 1, # Deploying would cause an early rebless
14);
15
16is(
17 ref $schema->storage, 'DBIx::Class::Storage::DBI',
18 'Starting with generic storage'
19);
20
21# Calling date_time_parser should cause the storage to be reblessed,
22# so that we can pick up datetime_parser_type from subclasses
23
24my $parser = $schema->storage->datetime_parser();
25
40f75181 26is($parser, 'DateTime::Format::SQLite', 'Got expected storage-set datetime_parser');
05e8dc0a 27isa_ok($schema->storage, 'DBIx::Class::Storage::DBI::SQLite', 'storage');
28