add test for on_connect_do=string parsing in helper, release v0.40
Rafael Kitover [Thu, 4 Feb 2010 04:13:19 +0000 (04:13 +0000)]
Changes
lib/Catalyst/Helper/Model/DBIC/Schema.pm
lib/Catalyst/Model/DBIC/Schema.pm
t/08helper.t

diff --git a/Changes b/Changes
index de73d5c..fbf2716 100644 (file)
--- 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
 
index 0508a58..d35bfb8 100644 (file)
@@ -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;
index 9cded57..8adb800 100644 (file)
@@ -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;
index 066a69d..748242e 100644 (file)
@@ -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',