aboutsummaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorgroditi <groditi@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7>2009-07-10 20:42:51 +0000
committergroditi <groditi@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7>2009-07-10 20:42:51 +0000
commit99535516a8275b3c98a90cb037d2c88219c2b756 (patch)
tree66dadc45c8914b3d3d0d2949c277c5514bcf3c46 /t
parentad0b52c377cccb45543fbd76d2e85288dfe4045e (diff)
downloadreaction-99535516a8275b3c98a90cb037d2c88219c2b756.tar.gz
reaction-99535516a8275b3c98a90cb037d2c88219c2b756.zip
String fragment viewport
Diffstat (limited to 't')
-rw-r--r--t/lib/RTest/InterfaceModel/Reflector/DBIC.pm4
-rw-r--r--t/lib/RTest/TestDB.pm4
-rw-r--r--t/lib/RTest/TestDB/Baz.pm4
3 files changed, 7 insertions, 5 deletions
diff --git a/t/lib/RTest/InterfaceModel/Reflector/DBIC.pm b/t/lib/RTest/InterfaceModel/Reflector/DBIC.pm
index fe1cee6..73effd4 100644
--- a/t/lib/RTest/InterfaceModel/Reflector/DBIC.pm
+++ b/t/lib/RTest/InterfaceModel/Reflector/DBIC.pm
@@ -195,7 +195,7 @@ sub test_reflect_submodel :Tests{
my %attrs = map { $_->name => $_ } $member->parameter_attributes;
my $target;
if( $sm eq "Bar"){$target = 4; }
- elsif($sm eq "Baz"){$target = 4; }
+ elsif($sm eq "Baz"){$target = 5; }
elsif($sm eq "Foo"){$target = 5; }
Test::More::is( scalar keys %attrs, $target, "Correct # of attributes for $sm");
@@ -292,7 +292,7 @@ sub test_reflect_submodel_action :Tests{
my $attr_num;
if($action_name =~ /Delete/){next; }
elsif($sm eq "Bar"){$attr_num = 4; }
- elsif($sm eq "Baz"){$attr_num = 3; }
+ elsif($sm eq "Baz"){$attr_num = 4; }
elsif($sm eq "Foo"){$attr_num = 3; }
Test::More::is( scalar keys %attrs, $attr_num, "Correct # of attributes for $sm");
if($attr_num != keys %attrs ){
diff --git a/t/lib/RTest/TestDB.pm b/t/lib/RTest/TestDB.pm
index 25012d2..e7b5459 100644
--- a/t/lib/RTest/TestDB.pm
+++ b/t/lib/RTest/TestDB.pm
@@ -17,8 +17,8 @@ sub setup_test_data {
) } (1 .. 50)
]);
$self->populate('Baz' => [
- [ qw/ name / ],
- map { [ "Baz $_" ] } (1 .. 4)
+ [ qw/ name description/ ],
+ map { [ "Baz $_", ("lorem ipsum dolor sit amet," x $_) ] } (1 .. 4)
]);
$self->populate('Bar' => [
[ qw/ name foo_id / ],
diff --git a/t/lib/RTest/TestDB/Baz.pm b/t/lib/RTest/TestDB/Baz.pm
index 14bbfaa..8ea0c51 100644
--- a/t/lib/RTest/TestDB/Baz.pm
+++ b/t/lib/RTest/TestDB/Baz.pm
@@ -4,11 +4,12 @@ package # hide from PAUSE
use Moose;
extends 'DBIx::Class::Core';
-use MooseX::Types::Moose qw/ArrayRef Int Bool/;
+use MooseX::Types::Moose qw/ArrayRef Int Bool Str/;
use MooseX::Types::Common::String qw/NonEmptySimpleStr/;
has 'id' => (isa => Int, is => 'ro', required => 1);
has 'name' => (isa => NonEmptySimpleStr, is => 'rw', required => 1);
+has 'description' => (isa => Str, is => 'rw',);
has 'bool_field' => (isa => Bool, is => 'rw', required => 0);
has 'foo_list' => (
isa => ArrayRef,
@@ -27,6 +28,7 @@ __PACKAGE__->table('baz');
__PACKAGE__->add_columns(
id => { data_type => 'integer', size => 16, is_auto_increment => 1 },
name => { data_type => 'varchar', size => 255 },
+ description => { data_type => 'text', is_nullable => 1 },
bool_field => {
data_type => 'char',
size => '1',