aboutsummaryrefslogtreecommitdiffstats
path: root/t/app
diff options
context:
space:
mode:
Diffstat (limited to 't/app')
-rw-r--r--t/app/controller/admin.t10
-rw-r--r--t/app/controller/admin/bodies.t11
2 files changed, 16 insertions, 5 deletions
diff --git a/t/app/controller/admin.t b/t/app/controller/admin.t
index b170633fc..5607f2dc3 100644
--- a/t/app/controller/admin.t
+++ b/t/app/controller/admin.t
@@ -84,10 +84,10 @@ subtest 'check summary counts' => sub {
FixMyStreet::override_config {
ALLOWED_COBRANDS => [ 'fixmystreet' ],
}, sub {
- $mech->get_ok('/admin');
+ $mech->get_ok('/admin/stats');
};
- $mech->title_like(qr/Summary/);
+ $mech->title_like(qr/Stats/);
$mech->content_contains( "$problem_count</strong> live problems" );
$mech->content_contains( "$a_count confirmed alerts" );
@@ -102,8 +102,8 @@ subtest 'check summary counts' => sub {
}, sub {
ok $mech->host('oxfordshire.fixmystreet.com');
- $mech->get_ok('/admin');
- $mech->title_like(qr/Summary/);
+ $mech->get_ok('/admin/stats');
+ $mech->title_like(qr/Stats/);
my ($num_live) = $mech->content =~ /(\d+)<\/strong> live problems/;
my ($num_alerts) = $mech->content =~ /(\d+) confirmed alerts/;
@@ -116,7 +116,7 @@ subtest 'check summary counts' => sub {
$alert->cobrand('oxfordshire');
$alert->update;
- $mech->get_ok('/admin');
+ $mech->get_ok('/admin/stats');
$mech->content_contains( ($num_live+1) . "</strong> live problems" );
$mech->content_contains( ($num_alerts+1) . " confirmed alerts" );
diff --git a/t/app/controller/admin/bodies.t b/t/app/controller/admin/bodies.t
index 340351473..c73a90da1 100644
--- a/t/app/controller/admin/bodies.t
+++ b/t/app/controller/admin/bodies.t
@@ -250,6 +250,17 @@ subtest 'disable form message editing' => sub {
}], 'right message added';
};
+subtest 'open311 protection editing' => sub {
+ $mech->get_ok('/admin/body/' . $body->id . '/test%20category');
+ $mech->submit_form_ok( { with_fields => {
+ open311_protect => 1,
+ note => 'Protected from Open311 changes',
+ } } );
+ $mech->content_contains('Values updated');
+ my $contact = $body->contacts->find({ category => 'test category' });
+ is $contact->get_extra_metadata('open311_protect'), 1, 'Open311 protect flag set';
+};
+
}; # END of override wrap