aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller/alert.t
diff options
context:
space:
mode:
Diffstat (limited to 't/app/controller/alert.t')
-rw-r--r--t/app/controller/alert.t11
1 files changed, 6 insertions, 5 deletions
diff --git a/t/app/controller/alert.t b/t/app/controller/alert.t
index 3d95bef6d..847aa1a17 100644
--- a/t/app/controller/alert.t
+++ b/t/app/controller/alert.t
@@ -2,11 +2,8 @@ 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' );
+use FixMyStreet::TestMech;
+my $mech = FixMyStreet::TestMech->new;
# check that we can get the page
$mech->get_ok('/alert');
@@ -51,6 +48,10 @@ $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->create_body_ok(2504, 'Birmingham City Council');
+$mech->create_body_ok(2226, 'Gloucestershire County Council');
+$mech->create_body_ok(2326, 'Cheltenham Borough Council');
+
$mech->get_ok('/alert/subscribe?rss=1&feed=area:1000:Birmingham');
is $mech->uri->path, '/rss/reports/Birmingham';