diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2018-07-02 16:36:35 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2018-07-02 16:36:35 +0100 |
commit | 6e3ea5f3fbc56919dd183276bfb84b1deef9c21c (patch) | |
tree | cbf63e1977ea545e2f2fa625f9a3444af3b4273a /t/cobrand | |
parent | 3b45695dddd4aa35e7b04a2a10b8e7732217e155 (diff) | |
parent | dadddc42f5e5c4b3a02db9171a485885b1e365a7 (diff) |
Merge branch 'use-the-body-id'
Diffstat (limited to 't/cobrand')
-rw-r--r-- | t/cobrand/fiksgatami.t | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/t/cobrand/fiksgatami.t b/t/cobrand/fiksgatami.t new file mode 100644 index 000000000..6510f5ebe --- /dev/null +++ b/t/cobrand/fiksgatami.t @@ -0,0 +1,30 @@ +use FixMyStreet::TestMech; +my $mech = FixMyStreet::TestMech->new; + +my $oslo = $mech->create_body_ok(3, 'Oslo'); +my $vestfold = $mech->create_body_ok(7, 'Vestfold'); +my $larvik = $mech->create_body_ok(709, 'Larvik'); + +FixMyStreet::override_config { + ALLOWED_COBRANDS => 'fiksgatami', + MAPIT_URL => 'http://mapit.uk/', + GEOCODER => '', +}, sub { + $mech->get_ok('/alert/list?pc=0045'); + $mech->content_contains('rss/l/59.9,10.9/2'); + $mech->content_contains('/rss/reports/Oslo'); + $mech->content_contains('council:' . $oslo->id . ':Oslo'); + + $mech->get_ok('/alert/list?pc=3290'); + $mech->content_contains('rss/l/59,10/5'); + $mech->content_contains('/rss/area/Larvik'); + $mech->content_contains('/rss/area/Vestfold'); + $mech->content_contains('/rss/reports/Larvik'); + $mech->content_contains('/rss/reports/Vestfold'); + $mech->content_contains('area:7:Vestfold'); + $mech->content_contains('area:709:Larvik'); + $mech->content_contains('council:' . $vestfold->id . ':Vestfold'); + $mech->content_contains('council:' . $larvik->id . ':Larvik'); +}; + +done_testing(); |