aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller/page_not_found.t
blob: 30a24df098e46eeeceaa43a276dd302308bae0a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use FixMyStreet::TestMech;

my $mech = FixMyStreet::TestMech->new;

# homepage ok
$mech->get_ok('/');

# get 404 page
my $path_to_404 = '/bad/path/page_error_404_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);

done_testing();