From: Rafael Kitover Date: Thu, 4 Feb 2010 04:13:19 +0000 (+0000) Subject: add test for on_connect_do=string parsing in helper, release X-Git-Tag: v0.40^0 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Model-DBIC-Schema.git;a=commitdiff_plain;h=510629748f0214f9e8bed35502a90edf7b6d589e add test for on_connect_do=string parsing in helper, release --- diff --git a/Changes b/Changes index de73d5c..fbf2716 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,8 @@ Revision history for Perl extension Catalyst::Model::DBIC::Schema +0.40 Wed Feb 3 23:12:16 EST 2010 + - fix Replicated trait deps + 0.39 Mon Feb 1 10:08:51 EST 2010 - better 'on_connect_do' parsing in Helper diff --git a/lib/Catalyst/Helper/Model/DBIC/Schema.pm b/lib/Catalyst/Helper/Model/DBIC/Schema.pm index 0508a58..d35bfb8 100644 --- a/lib/Catalyst/Helper/Model/DBIC/Schema.pm +++ b/lib/Catalyst/Helper/Model/DBIC/Schema.pm @@ -4,7 +4,7 @@ use namespace::autoclean; use Moose; no warnings 'uninitialized'; -our $VERSION = '0.39'; +our $VERSION = '0.40'; $VERSION = eval $VERSION; use Carp; diff --git a/lib/Catalyst/Model/DBIC/Schema.pm b/lib/Catalyst/Model/DBIC/Schema.pm index 9cded57..8adb800 100644 --- a/lib/Catalyst/Model/DBIC/Schema.pm +++ b/lib/Catalyst/Model/DBIC/Schema.pm @@ -5,7 +5,7 @@ use mro 'c3'; extends 'Catalyst::Model'; with 'CatalystX::Component::Traits'; -our $VERSION = '0.39'; +our $VERSION = '0.40'; $VERSION = eval $VERSION; use namespace::autoclean; diff --git a/t/08helper.t b/t/08helper.t index 066a69d..748242e 100644 --- a/t/08helper.t +++ b/t/08helper.t @@ -10,7 +10,6 @@ use Catalyst::Helper::Model::DBIC::Schema; use Storable 'dclone'; eval "use Catalyst::Helper"; plan skip_all => 'Catalyst::Helper required for tests' if $@; -plan tests => 41; my $helper = Catalyst::Helper->new; $helper->{base} = $Bin; @@ -118,6 +117,16 @@ is $i->helper->{connect_info}{name_sep}, 'q{.}', 'connect_info name_sep as string'; $i = instance(args => [ + $static, $sqlite, 'on_connect_do=PRAGMA foreign_keys = ON' +]); + +is $i->connect_info->{on_connect_do}, + 'PRAGMA foreign_keys = ON', 'on_connect_do string'; + +is $i->helper->{connect_info}{on_connect_do}, + 'q{PRAGMA foreign_keys = ON}', 'on_connect_do string as string'; + +$i = instance(args => [ $static, 'components=TimeStamp', $sqlite, '', $on_connect_do, $quote_char, $name_sep ]); @@ -156,6 +165,8 @@ is $i->helper->{connect_info}{auto_savepoint}, 'q{1}', is $i->helper->{connect_info}{AutoCommit}, 'q{0}', 'connect_info arg from extra hash as string'; +done_testing; + sub instance { Catalyst::Helper::Model::DBIC::Schema->new( schema_class => 'AnotherSchemaClass',