diff options
Diffstat (limited to 't/cobrand')
-rw-r--r-- | t/cobrand/hounslow.t | 14 |
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(); |