aboutsummaryrefslogtreecommitdiffstats
path: root/t/cobrand/zurich.t
diff options
context:
space:
mode:
authorMarius Halden <marius.h@lden.org>2016-12-16 15:02:53 +0100
committerMarius Halden <marius.h@lden.org>2016-12-16 15:02:53 +0100
commitdbf56159e44c1560a413022451bf1a1c4cb22a52 (patch)
tree275599a1894ca48d8dbf3c2843064c3dbf4affc7 /t/cobrand/zurich.t
parenta1603b96cae9258761f8cc59d76e0512f49afc3d (diff)
parent38490f6ea18064c232bda6ebfbaee052bd8f0951 (diff)
Merge tag 'v2.0.1' into fiksgatami-dev-v2
Diffstat (limited to 't/cobrand/zurich.t')
-rw-r--r--t/cobrand/zurich.t15
1 files changed, 14 insertions, 1 deletions
diff --git a/t/cobrand/zurich.t b/t/cobrand/zurich.t
index b59e546dd..ddaae1f90 100644
--- a/t/cobrand/zurich.t
+++ b/t/cobrand/zurich.t
@@ -102,8 +102,9 @@ sub get_export_rows_count {
my $EXISTING_REPORT_COUNT = 0;
+my $superuser;
subtest "set up superuser" => sub {
- my $superuser = $mech->log_in_ok( 'super@example.org' );
+ $superuser = $mech->log_in_ok( 'super@example.org' );
# a user from body $zurich is a superuser, as $zurich has no parent id!
$superuser->update({ from_body => $zurich->id });
$EXISTING_REPORT_COUNT = get_export_rows_count($mech);
@@ -968,6 +969,18 @@ subtest 'time_spent' => sub {
$mech->log_out_ok;
+FixMyStreet::override_config {
+ ALLOWED_COBRANDS => [ 'zurich' ],
+ MAPIT_URL => 'http://mapit.zurich/',
+ MAPIT_TYPES => [ 'ZZZ' ],
+}, sub {
+ LWP::Protocol::PSGI->register(t::Mock::MapItZurich->run_if_script, host => 'mapit.zurich');
+ subtest 'users at the top level can be edited' => sub {
+ $mech->log_in_ok( $superuser->email );
+ $mech->get_ok('/admin/user_edit/' . $superuser->id );
+ };
+};
+
END {
$mech->delete_body($subdivision);
$mech->delete_body($division);