aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller/admin.t
diff options
context:
space:
mode:
authorDave Whiteland <dave@mysociety.org>2012-05-29 15:57:41 +0100
committerDave Whiteland <dave@mysociety.org>2012-05-29 15:57:41 +0100
commit67da8efc720d2d0bd22bd9fe8655b7e983b35bb4 (patch)
tree38b8570647124df06c637d4b923f6010211ef328 /t/app/controller/admin.t
parent40b3a51d33caefa8f5fb97ce9be18ef936c7e260 (diff)
parent131ff6e9bf3626d6a8fff6ae54669d250148a63a (diff)
Merge remote branch 'origin/master' into fmb-read-only
Conflicts: bin/send-reports perllib/FixMyStreet/Cobrand/Default.pm perllib/FixMyStreet/Cobrand/FixMyStreet.pm templates/web/fixmystreet/alert/index.html templates/web/fixmystreet/around/display_location.html web/cobrands/fixmystreet/_layout.scss web/js/map-OpenLayers.js
Diffstat (limited to 't/app/controller/admin.t')
-rw-r--r--t/app/controller/admin.t49
1 files changed, 29 insertions, 20 deletions
diff --git a/t/app/controller/admin.t b/t/app/controller/admin.t
index d8a1c24a1..09d99cfdf 100644
--- a/t/app/controller/admin.t
+++ b/t/app/controller/admin.t
@@ -105,34 +105,39 @@ subtest 'check summary counts' => sub {
$mech->content_contains( "$q_count questionnaires sent" );
- ok $mech->host('barnet.fixmystreet.com');
+ SKIP: {
+ skip( "Need 'barnet' in ALLOWED_COBRANDS config", 7 )
+ unless FixMyStreet::Cobrand->exists('barnet');
- $mech->get_ok('/admin');
- $mech->title_like(qr/Summary/);
+ ok $mech->host('barnet.fixmystreet.com');
- my ($num_live) = $mech->content =~ /(\d+)<\/strong> live problems/;
- my ($num_alerts) = $mech->content =~ /(\d+) confirmed alerts/;
- my ($num_qs) = $mech->content =~ /(\d+) questionnaires sent/;
+ $mech->get_ok('/admin');
+ $mech->title_like(qr/Summary/);
- $report->council(2489);
- $report->cobrand('barnet');
- $report->update;
+ my ($num_live) = $mech->content =~ /(\d+)<\/strong> live problems/;
+ my ($num_alerts) = $mech->content =~ /(\d+) confirmed alerts/;
+ my ($num_qs) = $mech->content =~ /(\d+) questionnaires sent/;
- $alert->cobrand('barnet');
- $alert->update;
+ $report->council(2489);
+ $report->cobrand('barnet');
+ $report->update;
- $mech->get_ok('/admin');
+ $alert->cobrand('barnet');
+ $alert->update;
- $mech->content_contains( ($num_live+1) . "</strong> live problems" );
- $mech->content_contains( ($num_alerts+1) . " confirmed alerts" );
- $mech->content_contains( ($num_qs+1) . " questionnaires sent" );
+ $mech->get_ok('/admin');
- $report->council(2504);
- $report->cobrand('');
- $report->update;
+ $mech->content_contains( ($num_live+1) . "</strong> live problems" );
+ $mech->content_contains( ($num_alerts+1) . " confirmed alerts" );
+ $mech->content_contains( ($num_qs+1) . " questionnaires sent" );
+
+ $report->council(2504);
+ $report->cobrand('');
+ $report->update;
- $alert->cobrand('');
- $alert->update;
+ $alert->cobrand('');
+ $alert->update;
+ }
FixMyStreet::App->model('DB::Problem')->search( { council => 1 } )->update( { council => 2489 } );
ok $mech->host('fixmystreet.com');
@@ -222,6 +227,8 @@ subtest 'check open311 configuring' => sub {
api_key => 'api key',
endpoint => 'http://example.com/open311',
jurisdiction => 'mySociety',
+ send_comments => 0,
+ send_method => 'Open311',
}
}
);
@@ -244,6 +251,8 @@ subtest 'check open311 configuring' => sub {
api_key => 'new api key',
endpoint => 'http://example.org/open311',
jurisdiction => 'open311',
+ send_comments => 0,
+ send_method => 'Open311',
}
}
);