blob: 37983f6d46d71241928a9c1d7962fe1fb1d08177 (
plain)
ofs | hex dump | ascii |
---|
0000 | 62 30 56 49 4d 20 37 2e 34 00 00 00 00 10 00 00 3d 79 1d 55 63 13 02 00 62 4c 00 00 72 6f 6f 74 | b0VIM.7.4.......=y.Uc...bL..root |
0020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0040 | 00 00 00 00 65 69 6e 73 74 65 69 6e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ....einstein.................... |
0060 | 00 00 00 00 00 00 00 00 00 00 00 00 2f 72 6f 6f 74 2f 74 67 6d 61 6e 61 67 65 2f 77 65 62 2f 6e | ............/root/tgmanage/web/n |
0080 | 6d 73 2e 67 61 74 68 65 72 69 6e 67 2e 6f 72 67 2f 6e 6d 73 32 2f 6a 73 2f 6e 6d 73 32 2e 6a 73 | ms.gathering.org/nms2/js/nms2.js |
00a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
00c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
00e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 <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 class="no-js" 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 class="no-js" lang="en-gb"');
$mech->get_ok('/alert/list?pc=EH99 1SP');
$mech->title_like(qr/^Local RSS feeds and email alerts/);
$mech->content_contains('Here are the types of local problem alerts for ‘EH99 1SP’');
$mech->content_contains('html class="no-js" lang="en-gb"');
$mech->content_contains('Problems within 8.5km');
$mech->content_contains('rss/pc/EH991SP/2');
$mech->content_contains('rss/pc/EH991SP/5');
$mech->content_contains('rss/pc/EH991SP/10');
$mech->content_contains('rss/pc/EH991SP/20');
$mech->content_contains('Problems within City of Edinburgh');
$mech->content_contains('Problems within City Centre ward');
$mech->content_contains('/rss/reports/City+of+Edinburgh');
$mech->content_contains('/rss/reports/City+of+Edinburgh/City+Centre');
$mech->content_contains('council:2651:City_of_Edinburgh');
$mech->content_contains('ward:2651:20728:City_of_Edinburgh:City_Centre');
$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');
$mech->get_ok('/alert/list?pc=GL502PR');
$mech->content_contains('Problems within the boundary of');
$mech->get_ok('/alert/subscribe?rss=1&type=local&pc=ky16+8yg&rss=Give+me+an+RSS+feed&rznvy=' );
$mech->content_contains('Please select the feed you want');
$mech->get_ok('/alert/subscribe?rss=1&feed=invalid:1000:A_Locationtype=local&pc=ky16+8yg&rss=Give+me+an+RSS+feed&rznvy=');
$mech->content_contains('Illegal feed selection');
$mech->get_ok('/alert/subscribe?rss=1&feed=area:1000:Birmingham');
is $mech->uri->path, '/rss/reports/Birmingham';
$mech->get_ok('/alert/subscribe?rss=1&feed=area:1000:1001:Cheltenham:Lansdown');
is $mech->uri->path, '/rss/area/Cheltenham/Lansdown';
$mech->get_ok('/alert/subscribe?rss=1&feed=council:1000:Gloucestershire');
is $mech->uri->path, '/rss/reports/Gloucestershire';
$mech->get_ok('/alert/subscribe?rss=1&feed=ward:1000:1001:Cheltenham:Lansdown');
is $mech->uri->path, '/rss/reports/Cheltenham/Lansdown';
done_testing();
|