X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F07connect_info.t;h=e49dba1165c8e8f8d287c362c9e683a677104211;hb=46a2eb0ca8128a8a2a6ac06b18d1a33d747d1d33;hp=0e0ed70e6264685f29de6d7e3573f2ae408b7341;hpb=7b1fe8c2e5b881354624365a942e52a655229e8b;p=catagits%2FCatalyst-Model-DBIC-Schema.git diff --git a/t/07connect_info.t b/t/07connect_info.t index 0e0ed70..e49dba1 100644 --- a/t/07connect_info.t +++ b/t/07connect_info.t @@ -47,7 +47,7 @@ my @invalid = ( { pg_enable_utf8 => 1 }, { AutoCommit => 1 }, { auto_savepoint => 1 }], ); -plan tests => @tests / 2 + @invalid + 1; +plan tests => @tests / 2 + @invalid + 1 + 1; # ignore redefined warnings, and uninitialized warnings from old # ::Storage::DBI::Replicated @@ -88,6 +88,14 @@ is_deeply $m->replicants, [ map $tests[$_], grep $_ % 2, 0 .. $#tests ], 'replicant connect_infos coerced correctly'; +{ + ASchemaClass->connection( @{$tests[0]} ); + my $m = instance(); + + is_deeply $m->connect_info, $tests[1], + 'connect_info coerced correctly when defining connection in the schema class'; +} + sub instance { Catalyst::Model::DBIC::Schema->new({ schema_class => 'ASchemaClass',