diff options
author | Jesse Luehrs <doy@tozt.net> | 2012-10-11 14:22:55 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2012-10-11 14:23:09 -0500 |
commit | cd59caeec925cf0bf8625d567a442e3c46ae7475 (patch) | |
tree | 9fc7ba28aca00fec5f6c53ee1b18249fcd4df006 /t/complex.t | |
parent | c5ee7923bb6d38f138e58e7da5f9dfaa85bb9721 (diff) | |
download | moosex-validation-doctypes-cd59caeec925cf0bf8625d567a442e3c46ae7475.tar.gz moosex-validation-doctypes-cd59caeec925cf0bf8625d567a442e3c46ae7475.zip |
also provide stringification for the error object
Diffstat (limited to 't/complex.t')
-rw-r--r-- | t/complex.t | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/t/complex.t b/t/complex.t index b617cab..04dbe60 100644 --- a/t/complex.t +++ b/t/complex.t @@ -166,25 +166,24 @@ doctype 'Location' => { } }); is_deeply( - $errors, + $errors->errors, { - errors => { - contact => { - email => "invalid value \"anelson at cpan.org\" for 'contact.email'" - }, - i18n => { - available_currencies => "invalid value [ \"dolla dolla bill\", \"CAD\", \"EUR\" ] for 'i18n.available_currencies'", - default_currency => "invalid value undef for 'i18n.default_currency'" - }, - location => { - coordinates => { - lon => "invalid value \"38q\" for 'location.coordinates.lon'" - } + contact => { + email => "invalid value \"anelson at cpan.org\" for 'contact.email'" + }, + i18n => { + available_currencies => "invalid value [ \"dolla dolla bill\", \"CAD\", \"EUR\" ] for 'i18n.available_currencies'", + default_currency => "invalid value undef for 'i18n.default_currency'" + }, + location => { + coordinates => { + lon => "invalid value \"38q\" for 'location.coordinates.lon'" } } }, "got the right errors" ); + ok(!$errors->has_extra_data, "no extra data"); } } |