diff options
author | Struan Donald <struan@exo.org.uk> | 2018-12-21 16:23:16 +0000 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2019-01-04 10:48:19 +0000 |
commit | bf87405adafa89e5df7de3141ef08fb1ec85ff32 (patch) | |
tree | 56cd622f5b454ddaa125615d13100b1b847e13ac /t/app/controller/around.t | |
parent | 2da0a37f3c72dae02044b184a8d9c73202947cc1 (diff) |
add private only report filter
Diffstat (limited to 't/app/controller/around.t')
-rw-r--r-- | t/app/controller/around.t | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/t/app/controller/around.t b/t/app/controller/around.t index 18281396a..cb36833ad 100644 --- a/t/app/controller/around.t +++ b/t/app/controller/around.t @@ -171,6 +171,19 @@ for my $permission ( qw/ report_inspect report_mark_private/ ) { }; $mech->content_contains( "Around page Test 3 for $body_edin_id", 'problem marked non public is visible' ); + $mech->content_contains( "Around page Test 2 for $body_edin_id", + 'problem marked public is visible' ); + + FixMyStreet::override_config { + ALLOWED_COBRANDS => [ { 'fixmystreet' => '.' } ], + MAPIT_URL => 'http://mapit.uk/', + }, sub { + $mech->get_ok('/around?pc=EH1+1BB&status=non_public'); + }; + $mech->content_contains( "Around page Test 3 for $body_edin_id", + 'problem marked non public is visible' ); + $mech->content_lacks( "Around page Test 2 for $body_edin_id", + 'problem marked public is not visible' ); $user->user_body_permissions->delete(); $user->update({ from_body => $body2 }); @@ -189,6 +202,19 @@ for my $permission ( qw/ report_inspect report_mark_private/ ) { }; $mech->content_lacks( "Around page Test 3 for $body_edin_id", 'problem marked non public is not visible' ); + $mech->content_contains( "Around page Test 2 for $body_edin_id", + 'problem marked public is visible' ); + + FixMyStreet::override_config { + ALLOWED_COBRANDS => [ { 'fixmystreet' => '.' } ], + MAPIT_URL => 'http://mapit.uk/', + }, sub { + $mech->get_ok('/around?pc=EH1+1BB&status=non_public'); + }; + $mech->content_lacks( "Around page Test 3 for $body_edin_id", + 'problem marked non public is not visible' ); + $mech->content_lacks( "Around page Test 2 for $body_edin_id", + 'problem marked public is visible' ); }; } |