-use DBIx::Class::Optional::Dependencies -skip_all_without => 'test_dt_sqlite';
+BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) }
+use DBIx::Class::Optional::Dependencies -skip_all_without => qw( ic_dt test_rdbms_sqlite );
use strict;
use warnings;
use Test::More;
use Test::Warn;
use Try::Tiny;
-use lib qw(t/lib);
+
use DBICTest;
# Test offline parser determination (formerly t/inflate/datetime_determine_parser.t)
no_deploy => 1, # Deploying would cause an early rebless
);
- is(
- ref $schema->storage, 'DBIx::Class::Storage::DBI',
- 'Starting with generic storage'
- );
+ my $storage = $schema->storage;
+
+ if( $storage->isa('DBIx::Class::Storage::DBI::Replicated') ) {
+ $storage = $storage->master;
+ }
+ else {
+ is(
+ ref $storage, 'DBIx::Class::Storage::DBI',
+ 'Starting with generic storage'
+ );
+ }
# Calling date_time_parser should cause the storage to be reblessed,
# so that we can pick up datetime_parser_type from subclasses
- my $parser = $schema->storage->datetime_parser();
+ my $parser = $storage->datetime_parser();
is($parser, 'DateTime::Format::SQLite', 'Got expected storage-set datetime_parser');
- isa_ok($schema->storage, 'DBIx::Class::Storage::DBI::SQLite', 'storage');
+ isa_ok($storage, 'DBIx::Class::Storage::DBI::SQLite', 'storage');
- ok(! $schema->storage->connected, 'Not yet connected');
+ ok(! $storage->connected, 'Not yet connected');
}
# so user's env doesn't screw us