aboutsummaryrefslogtreecommitdiffstats
path: root/t/cobrand/oxfordshire.t
diff options
context:
space:
mode:
authorMarius Halden <marius.h@lden.org>2017-05-28 21:31:42 +0200
committerMarius Halden <marius.h@lden.org>2017-05-28 21:31:42 +0200
commit987124b09a32248414faf4d0d6615d43b29ac6f6 (patch)
treea549db8af723c981d3b346e855f25d6fd5ff8aa7 /t/cobrand/oxfordshire.t
parentdbf56159e44c1560a413022451bf1a1c4cb22a52 (diff)
parenta085b63ce09f87e83b75cda9b9cd08aadfe75d61 (diff)
Merge tag 'v2.0.4' into fiksgatami-dev
Diffstat (limited to 't/cobrand/oxfordshire.t')
-rw-r--r--t/cobrand/oxfordshire.t23
1 files changed, 23 insertions, 0 deletions
diff --git a/t/cobrand/oxfordshire.t b/t/cobrand/oxfordshire.t
index d9f880d07..b0fad3b56 100644
--- a/t/cobrand/oxfordshire.t
+++ b/t/cobrand/oxfordshire.t
@@ -45,6 +45,29 @@ subtest 'check /ajax defaults to open reports only' => sub {
}
};
+my $superuser = $mech->create_user_ok('superuser@example.com', name => 'Super User', is_superuser => 1);
+
+subtest 'Exor RDI download appears on Oxfordshire cobrand admin' => sub {
+ FixMyStreet::override_config {
+ ALLOWED_COBRANDS => [ { 'oxfordshire' => '.' } ],
+ }, sub {
+ $mech->log_in_ok( $superuser->email );
+ $mech->get_ok('/admin');
+ $mech->content_contains("Download Exor RDI");
+ }
+};
+
+subtest 'Exor RDI download doesn’t appear outside of Oxfordshire cobrand admin' => sub {
+ FixMyStreet::override_config {
+ ALLOWED_COBRANDS => [ { 'fixmystreet' => '.' } ],
+ }, sub {
+ $mech->log_in_ok( $superuser->email );
+ $mech->get_ok('/admin');
+ $mech->content_lacks("Download Exor RDI");
+ }
+};
+
# Clean up
+$mech->delete_user( $superuser );
$mech->delete_problems_for_body( 2237 );
done_testing();