blob: 31b5fb3cf593e5efae02e1002eb3f74cb2e6eb6f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
use strict;
use warnings;
use Test::More;
use Catalyst::Test 'FixMyStreet::App';
use Test::WWW::Mechanize::Catalyst 'FixMyStreet::App';
ok( my $mech = Test::WWW::Mechanize::Catalyst->new, 'Created mech object' );
# check that we can get the page
$mech->get_ok('/alert');
$mech->title_like(qr/^Local RSS feeds and email alerts/);
$mech->content_contains('Local RSS feeds and email alerts');
$mech->content_contains('html lang="en-gb"');
# check that we can get list page
$mech->get_ok('/alert/list');
$mech->title_like(qr/^Local RSS feeds and email alerts/);
$mech->content_contains('Local RSS feeds and email alerts');
$mech->content_contains('html lang="en-gb"');
$mech->get_ok('/alert/list?pc=EH99 1SP');
$mech->title_like(qr/^Local RSS feeds and email alerts/);
$mech->content_contains('Local RSS feeds and email alerts for EH99 1SP');
$mech->content_contains('html lang="en-gb"');
$mech->get_ok('/alert/list?pc=High Street');
$mech->content_contains('We found more than one match for that location');
$mech->get_ok('/alert/list?pc=');
$mech->content_contains('hat location does not appear to be covered by a council');
done_testing();
|