diff options
author | Matthew Somerville <matthew@mysociety.org> | 2019-10-03 14:56:54 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2019-10-03 15:00:21 +0100 |
commit | 1d9d1c0dc389028ac222f7422ff0446d4e233a08 (patch) | |
tree | 8744270a79cd2e02e3b7610fa8436fb6442ef3d0 /t/app/controller | |
parent | 82d3721d01ac9c0399a8d0a4456d8972774f1eaf (diff) |
Rename variable that shows missing body message.
As the around page includes a copy of the reporting form (when JS is
available), it runs the same templating code that the reporting form
does. Part of this code compares the bodies and bodies_to_list stash
variables to see whether it needs to display a message about missing
body information. Previously both variables were empty on the around
page itself, so no message would be shown, but a new bodies variable
was added in 4668f81a, which meant the message was now output in the
HTML and shown briefly when the map was clicked - until updated by a
server response). Rename the variable so that this no longer occurs.
Diffstat (limited to 't/app/controller')
-rw-r--r-- | t/app/controller/around.t | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/t/app/controller/around.t b/t/app/controller/around.t index 829d78ca3..7f88b13c1 100644 --- a/t/app/controller/around.t +++ b/t/app/controller/around.t @@ -137,6 +137,18 @@ subtest 'check non public reports are not displayed on around page' => sub { 'problem marked non public is not visible' ); }; +subtest 'check missing body message not shown when it does not need to be' => sub { + $mech->get_ok('/'); + FixMyStreet::override_config { + ALLOWED_COBRANDS => 'fixmystreet', + MAPIT_URL => 'http://mapit.uk/', + }, sub { + $mech->submit_form_ok( { with_fields => { pc => 'EH1 1BB' } }, + "good location" ); + }; + $mech->content_lacks('yet have details for the other councils that cover this location'); +}; + for my $permission ( qw/ report_inspect report_mark_private/ ) { subtest 'check non public reports are displayed on around page with $permission permission' => sub { my $body = FixMyStreet::DB->resultset('Body')->find( $body_edin_id ); |