aboutsummaryrefslogtreecommitdiffstats
path: root/t/cobrand
diff options
context:
space:
mode:
authorDave Arter <davea@mysociety.org>2016-12-07 11:39:59 +0000
committerDave Arter <davea@mysociety.org>2017-02-15 17:36:55 +0000
commit4d44ea5530a7dc25122e5135c19d89b4cebc5f40 (patch)
tree28ff117ae830534ccd37d3bdc70c8e5dba7f53e9 /t/cobrand
parentcd7e3087567b0fa7e64f52d802e5e911708a7eb8 (diff)
[Oxfordshire] Add Exor RDI file download feature
The RDI file format encapsulates information about inspections that have taken place, and can be uploaded into Exor to create defects in bulk. This commit adds a page to the Oxfordshire cobrand's admin allowing RDI files to be generated and downloaded from FMS. For mysociety/fixmystreetforcouncils#127
Diffstat (limited to 't/cobrand')
-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();