aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller/dashboard.t
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2019-02-15 13:38:53 +0000
committerMatthew Somerville <matthew-github@dracos.co.uk>2019-02-15 13:38:53 +0000
commit558438e9750a29d98584edf345366a23ca0b2092 (patch)
treee1952b344fbccff5c9db448b6e28004c180c7a3c /t/app/controller/dashboard.t
parent0d1ee3b9b219c25529e4232ce2b93f1079496e25 (diff)
parentc2089e945132d36468f1d9a3bf08ae4d661cf44a (diff)
Merge branch 'issues/commercial/1270-user-areas'
Diffstat (limited to 't/app/controller/dashboard.t')
-rw-r--r--t/app/controller/dashboard.t8
1 files changed, 6 insertions, 2 deletions
diff --git a/t/app/controller/dashboard.t b/t/app/controller/dashboard.t
index a5fa8772a..37903513c 100644
--- a/t/app/controller/dashboard.t
+++ b/t/app/controller/dashboard.t
@@ -113,7 +113,7 @@ FixMyStreet::override_config {
};
subtest 'area user can only see their area' => sub {
- $counciluser->update({area_id => $area_id});
+ $counciluser->update({area_ids => [ $area_id ]});
$mech->get_ok("/dashboard");
$mech->content_contains('<h1>Trowbridge</h1>');
@@ -122,7 +122,11 @@ FixMyStreet::override_config {
$mech->get_ok("/dashboard?ward=$alt_area_id");
$mech->content_contains('<h1>Trowbridge</h1>');
- $counciluser->update({area_id => undef});
+ $counciluser->update({area_ids => [ $area_id, $alt_area_id ]});
+ $mech->get_ok("/dashboard");
+ $mech->content_contains('<h1>Bradford-on-Avon / Trowbridge</h1>');
+
+ $counciluser->update({area_ids => undef});
};
subtest 'The correct categories and totals shown by default' => sub {