aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller/alert.t
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2018-07-02 16:36:35 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2018-07-02 16:36:35 +0100
commit6e3ea5f3fbc56919dd183276bfb84b1deef9c21c (patch)
treecbf63e1977ea545e2f2fa625f9a3444af3b4273a /t/app/controller/alert.t
parent3b45695dddd4aa35e7b04a2a10b8e7732217e155 (diff)
parentdadddc42f5e5c4b3a02db9171a485885b1e365a7 (diff)
Merge branch 'use-the-body-id'
Diffstat (limited to 't/app/controller/alert.t')
-rw-r--r--t/app/controller/alert.t17
1 files changed, 9 insertions, 8 deletions
diff --git a/t/app/controller/alert.t b/t/app/controller/alert.t
index 57e73e5ec..41aee5bbc 100644
--- a/t/app/controller/alert.t
+++ b/t/app/controller/alert.t
@@ -9,6 +9,11 @@ $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"');
+my $body = $mech->create_body_ok(2651, 'Edinburgh');
+$mech->create_body_ok(2504, 'Birmingham City Council');
+$mech->create_body_ok(2226, 'Gloucestershire County Council');
+$mech->create_body_ok(2326, 'Cheltenham Borough Council');
+
# check that we can get list page
FixMyStreet::override_config {
ALLOWED_COBRANDS => [ { 'fixmystreet' => '.' } ],
@@ -33,8 +38,8 @@ FixMyStreet::override_config {
$mech->content_contains('Problems within City Centre ward');
$mech->content_contains('/rss/reports/Edinburgh');
$mech->content_contains('/rss/reports/Edinburgh/City+Centre');
- $mech->content_contains('council:2651:Edinburgh');
- $mech->content_contains('ward:2651:20728:Edinburgh:City_Centre');
+ $mech->content_contains('council:' . $body->id . ':Edinburgh');
+ $mech->content_contains('ward:' . $body->id . ':20728:Edinburgh:City_Centre');
subtest "Test Nominatim lookup" => sub {
$mech->get_ok('/alert/list?pc=High Street');
@@ -49,16 +54,12 @@ FixMyStreet::override_config {
$mech->content_contains('Problems in an area');
$mech->content_contains('Reports by destination');
- $mech->get_ok('/alert/subscribe?rss=1&type=local&pc=ky16+8yg&rss=Give+me+an+RSS+feed&rznvy=' );
+ $mech->get_ok('/alert/subscribe?rss=1&type=local&pc=EH1+1BB&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->get_ok('/alert/subscribe?rss=1&feed=invalid:1000:A_Locationtype=local&pc=EH1+1BB&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';