X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F07connect_info.t;h=519a5cada58405fd90b9daf800bfe0cd3b54b529;hb=8c4218a5bb573d2c51dfca9381b3823e514fd9ae;hp=bb5c9adfc139880165507f8d73657b78fc98984d;hpb=2fa0a1f11f9a8e53c107f407e4bfdc8715114b23;p=catagits%2FCatalyst-Model-DBIC-Schema.git diff --git a/t/07connect_info.t b/t/07connect_info.t index bb5c9ad..519a5ca 100644 --- a/t/07connect_info.t +++ b/t/07connect_info.t @@ -52,8 +52,6 @@ my @invalid = ( { pg_enable_utf8 => 1 }, { AutoCommit => 1 }, { auto_savepoint => 1 }], ); -plan tests => @tests / 2 + @invalid + 1 + 1; - # ignore redefined warnings, and uninitialized warnings from old # ::Storage::DBI::Replicated local $SIG{__WARN__} = sub { @@ -89,6 +87,11 @@ my $m = TryConnectInfos->new( replicants => \@replicants ); +lives_and { + is_deeply(TryConnectInfos->new(replicants => $tests[1])->replicants, + [ $tests[1] ]) +} 'single replicant hashref coerces correctly'; + is_deeply $m->replicants, [ map $tests[$_], grep $_ % 2, 0 .. $#tests ], 'replicant connect_infos coerced correctly'; @@ -101,6 +104,8 @@ is_deeply $m->replicants, [ 'connect_info coerced correctly when defining connection in the schema class'; } +done_testing; + sub instance { Catalyst::Model::DBIC::Schema->new({ schema_class => 'ASchemaClass',