blob: 05e983109507f2e28c180e5746d2d4de88581b2f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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_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);
|