Massive cleanup of DateTime test dependencies, other interim
[dbsrgits/DBIx-Class.git] / t / inflate / datetime_determine_parser.t
CommitLineData
05e8dc0a 1use strict;
68de9438 2use warnings;
05e8dc0a 3
4use Test::More;
5use lib qw(t/lib);
6use DBICTest;
7
68de9438 8plan skip_all => 'Test needs ' . DBIx::Class::Optional::Dependencies->req_missing_for ('test_dt_sqlite')
9 unless DBIx::Class::Optional::Dependencies->req_ok_for ('test_dt_sqlite');
05e8dc0a 10
11my $schema = DBICTest->init_schema(
12 no_deploy => 1, # Deploying would cause an early rebless
13);
14
15is(
16 ref $schema->storage, 'DBIx::Class::Storage::DBI',
17 'Starting with generic storage'
18);
19
20# Calling date_time_parser should cause the storage to be reblessed,
21# so that we can pick up datetime_parser_type from subclasses
22
23my $parser = $schema->storage->datetime_parser();
24
40f75181 25is($parser, 'DateTime::Format::SQLite', 'Got expected storage-set datetime_parser');
05e8dc0a 26isa_ok($schema->storage, 'DBIx::Class::Storage::DBI::SQLite', 'storage');
27
68de9438 28done_testing;