aboutsummaryrefslogtreecommitdiffstats
path: root/t/cobrand
diff options
context:
space:
mode:
authorHakim Cassimally <hakim@mysociety.org>2013-12-10 16:59:56 +0000
committerHakim Cassimally <hakim@mysociety.org>2013-12-10 16:59:56 +0000
commit52fcc8addf58e5f1cb5ce87d1ec2d15ccfc4cd81 (patch)
tree618d06b5b205b4725dfe68a0b0417fcebf1e518d /t/cobrand
parent730abb82c55b7fe15aa9fe8c05ed1af6b522dc0c (diff)
[Zurich] testing - create superuser earlier
So that tests pass on clean dataset such as travis...
Diffstat (limited to 't/cobrand')
-rw-r--r--t/cobrand/zurich.t9
1 files changed, 7 insertions, 2 deletions
diff --git a/t/cobrand/zurich.t b/t/cobrand/zurich.t
index 6fd6677f5..fb6f172fe 100644
--- a/t/cobrand/zurich.t
+++ b/t/cobrand/zurich.t
@@ -79,6 +79,13 @@ $external_body->send_method( 'Zurich' );
$external_body->endpoint( 'external_body@example.org' );
$external_body->update;
+subtest "set up superuser" => sub {
+ my $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 });
+ $mech->log_out_ok;
+};
+
my @reports = $mech->create_problems_for_body( 1, 2, 'Test', {
state => 'unconfirmed',
confirmed => undef,
@@ -486,8 +493,6 @@ $mech->log_out_ok;
subtest "only superuser can see stats" => sub {
$user = $mech->log_in_ok( 'super@example.org' );
- # a user from body $zurich is a superuser, as $zurich has no parent id!
- $user->update({ from_body => $zurich->id });
FixMyStreet::override_config {
ALLOWED_COBRANDS => [ 'zurich' ],