aboutsummaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2019-07-15 10:06:31 +0100
committerMatthew Somerville <matthew@mysociety.org>2019-07-16 10:20:40 +0100
commiteca03317b9c26af2a4bf8de1b1058b45445b6fc7 (patch)
tree917e1e61e940f7bee2d18b19d241bccc75ce94f0 /t
parentfcc46472c7abd45cdafd2c3bcb6bc673ebd300b5 (diff)
[UK] Allow multiple admin user domains.
Diffstat (limited to 't')
-rw-r--r--t/cobrand/hounslow.t14
1 files changed, 13 insertions, 1 deletions
diff --git a/t/cobrand/hounslow.t b/t/cobrand/hounslow.t
index 43a5a5523..cb67ad397 100644
--- a/t/cobrand/hounslow.t
+++ b/t/cobrand/hounslow.t
@@ -9,7 +9,8 @@ $mech->create_contact_ok(
email => 'pothole@example.org',
);
-$mech->create_user_ok('staff@example.org', from_body => $hounslow_id);
+my $user = $mech->create_user_ok('staff@example.org', from_body => $hounslow_id);
+$user->user_body_permissions->create({ body_id => $hounslow_id, permission_type => 'user_edit' });
my $tfl = $mech->create_body_ok( 2483, 'TfL');
$mech->create_contact_ok(
@@ -96,4 +97,15 @@ subtest "Shows external ID on report page to staff users only" => sub {
};
};
+subtest "Admin searches right domains" => sub {
+ FixMyStreet::override_config {
+ ALLOWED_COBRANDS => 'hounslow',
+ }, sub {
+ foreach ('hounslowhighways.org', 'hounslow.gov.uk') {
+ $mech->get_ok('/admin/users?search=xyz@' . $_);
+ $mech->content_contains('xyz@' . $_);
+ }
+ };
+};
+
done_testing();