diff options
author | Struan Donald <struan@exo.org.uk> | 2019-10-17 11:30:42 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2019-10-18 09:23:38 +0100 |
commit | a23084bfca7fc7ed4d91d0c6d79689c0d6979de4 (patch) | |
tree | 855bf55656309b99128cca63bcf41c9ab46f8d2c | |
parent | b2a98a09c00a918b472ef5c97f48aa68b867571b (diff) |
[IsleOfWight] do not mention council in not responsible
Use Island Roads in place of council in not responsible message.
Fixes mysociety/fixmystreet-freshdesk#93
-rw-r--r-- | perllib/FixMyStreet/DB/ResultSet/State.pm | 1 | ||||
-rw-r--r-- | t/cobrand/isleofwight.t | 31 |
2 files changed, 32 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/DB/ResultSet/State.pm b/perllib/FixMyStreet/DB/ResultSet/State.pm index 9ab95ecaf..cb894005f 100644 --- a/perllib/FixMyStreet/DB/ResultSet/State.pm +++ b/perllib/FixMyStreet/DB/ResultSet/State.pm @@ -74,6 +74,7 @@ sub display { return $unchanging->{$label} if $unchanging->{$label}; if ($cobrand && $label eq 'not responsible') { return 'third party responsibility' if $cobrand eq 'bromley'; + return "not Island Roads' responsibility" if $cobrand eq 'isleofwight'; return _("not the council's responsibility"); } if ($cobrand && $cobrand eq 'oxfordshire' && $label eq 'unable to fix') { diff --git a/t/cobrand/isleofwight.t b/t/cobrand/isleofwight.t index 1eb710e97..fd08ce455 100644 --- a/t/cobrand/isleofwight.t +++ b/t/cobrand/isleofwight.t @@ -386,6 +386,37 @@ subtest "sends branded alert emails" => sub { $p->comments->delete; $p->delete; +subtest "check not responsible as correct text" => sub { + my ($p) = $mech->create_problems_for_body( + 1, $isleofwight->id, 'Title', + { + category => 'Roads', + areas => 2636, + latitude => 50.71086, + longitude => -1.29573, + whensent => DateTime->now->add( minutes => -5 ), + send_method_used => 'Open311', + state => 'not responsible', + external_id => 1, + }); + + my $c = FixMyStreet::App->model('DB::Comment')->create({ + problem => $p, user => $p->user, anonymous => 't', text => 'Update text', + problem_state => 'not responsible', state => 'confirmed', mark_fixed => 0, + confirmed => DateTime->now(), + }); + FixMyStreet::override_config { + MAPIT_URL => 'http://mapit.uk/', + ALLOWED_COBRANDS => ['isleofwight'], + }, sub { + $mech->get_ok('/report/' . $p->id); + }; + + $mech->content_contains("not Island Roads' responsibility", "not reponsible message contains correct text"); + $p->comments->delete; + $p->delete; +}; + subtest "sends branded confirmation emails" => sub { $mech->log_out_ok; $mech->clear_emails_ok; |