diff options
author | Edmund von der Burg <evdb@mysociety.org> | 2011-02-23 22:27:57 +0000 |
---|---|---|
committer | Edmund von der Burg <evdb@mysociety.org> | 2011-02-23 22:27:57 +0000 |
commit | 9bd3b875d7a16f2a8842feb6913431ae789047bd (patch) | |
tree | 5886a3342f11a0c76ab1763949224dacef1ff5a3 /t/app/controller | |
parent | fa5163eff32b66edb244f1d121cbec74469e3f48 (diff) |
Tidy t/app
Diffstat (limited to 't/app/controller')
-rw-r--r-- | t/app/controller/page_not_found.t | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/t/app/controller/page_not_found.t b/t/app/controller/page_not_found.t new file mode 100644 index 000000000..9c8d7e5a6 --- /dev/null +++ b/t/app/controller/page_not_found.t @@ -0,0 +1,20 @@ +#!/usr/bin/perl + +use strict; +use warnings; + +use Test::More tests => 4; + +use Test::WWW::Mechanize::Catalyst 'FixMyStreet::App'; + +my $mech = Test::WWW::Mechanize::Catalyst->new; + +# homepage ok +$mech->get_ok('/'); + +# get 404 page +my $path_to_404 = '/bad/path/page_not_found'; +my $res = $mech->get($path_to_404); +ok !$res->is_success(), "want a bad response"; +is $res->code, 404, "got 404"; +$mech->content_contains($path_to_404); |