From d3f139d43cab78a41a17f78530d5bec907fd74d3 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Thu, 18 Mar 2010 14:46:32 -0700 Subject: [PATCH] Test WebGUI::Types --- t/Definition.t | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/t/Definition.t b/t/Definition.t index 21ed4f795..504c32d76 100644 --- a/t/Definition.t +++ b/t/Definition.t @@ -206,20 +206,13 @@ my $session = WebGUI::Test->session; use Moose::Util::TypeConstraints; use WebGUI::Definition; use JSON; - - subtype 'WGT::Type::JSONArray' - => as 'ArrayRef' - ; - coerce 'WGT::Type::JSONArray' - => from Str - => via { my $struct = eval { JSON::from_json($_); }; $struct ||= []; return $struct }, - ; + use WebGUI::Types; property 'leaded' => ( noFormPost => 1, default => sub { [] }, traits => ['Array', 'WebGUI::Definition::Meta::Property::Serialize'], - isa => 'WGT::Type::JSONArray', + isa => 'WebGUI::Type::JSONArray', coerce => 1, );