[Jifty-commit] r4604 - in jifty/trunk: .
t/TestApp/share/web/templates
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Sun Dec 2 23:57:22 EST 2007
Author: alexmv
Date: Sun Dec 2 23:57:21 2007
New Revision: 4604
Added:
jifty/trunk/t/TestApp/share/web/templates/template-with-error
jifty/trunk/t/TestApp/t/20-error-pages.t
Modified:
jifty/trunk/ (props changed)
Log:
r25342 at zoq-fot-pik: chmrr | 2007-12-02 23:55:41 -0500
* Failing test for error pages
Added: jifty/trunk/t/TestApp/share/web/templates/template-with-error
==============================================================================
--- (empty file)
+++ jifty/trunk/t/TestApp/share/web/templates/template-with-error Sun Dec 2 23:57:21 2007
@@ -0,0 +1,7 @@
+<&|/_elements/wrapper, title => 'Jifty Test Application' &>
+Whee!
+
+% Jifty->web->non_existant_method;
+
+Fun!
+</&>
Added: jifty/trunk/t/TestApp/t/20-error-pages.t
==============================================================================
--- (empty file)
+++ jifty/trunk/t/TestApp/t/20-error-pages.t Sun Dec 2 23:57:21 2007
@@ -0,0 +1,35 @@
+#!/usr/bin/env perl
+
+use warnings;
+use strict;
+
+=head1 DESCRIPTION
+
+Tests that error pages work
+
+=cut
+
+use lib 't/lib';
+use Jifty::SubTest;
+
+use Jifty::Test tests => 10;
+use Jifty::Test::WWW::Mechanize;
+
+ok(1, "Loaded the test script");
+
+my $server = Jifty::Test->make_server;
+isa_ok( $server, 'Jifty::Server' );
+my $URL = $server->started_ok;
+
+my $mech = Jifty::Test::WWW::Mechanize->new;
+$mech->get_ok("$URL/template-with-error");
+$mech->base_like(qr/mason_internal_error/);
+$mech->content_like(qr/locate object method .*?non_existant_method.*?/);
+$mech->content_like(qr/template-with-error line 5/);
+
+ok($mech->continuation, "Have a continuation");
+ok($mech->continuation->response->error, "Have an error set");
+isa_ok($mech->continuation->response->error, "HTML::Mason::Exception", "Error is a reference");
+
+1;
+
More information about the Jifty-commit
mailing list