aboutsummaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to 't')
-rw-r--r--t/cobrand/northamptonshire.t79
1 files changed, 79 insertions, 0 deletions
diff --git a/t/cobrand/northamptonshire.t b/t/cobrand/northamptonshire.t
index 11b22bdb0..5758f700f 100644
--- a/t/cobrand/northamptonshire.t
+++ b/t/cobrand/northamptonshire.t
@@ -114,6 +114,15 @@ subtest 'check further investigation state' => sub {
FixMyStreet::override_config {
ALLOWED_COBRANDS => [ { northamptonshire => '.' } ],
MAPIT_URL => 'http://mapit.uk/',
+ COBRAND_FEATURES => {
+ extra_state_mapping => {
+ northamptonshire => {
+ investigating => {
+ further => 'Under further investigation'
+ }
+ }
+ }
+ }
}, sub {
$mech->get_ok('/report/' . $comment->problem_id);
};
@@ -126,6 +135,76 @@ subtest 'check further investigation state' => sub {
FixMyStreet::override_config {
ALLOWED_COBRANDS => [ { northamptonshire => '.' } ],
MAPIT_URL => 'http://mapit.uk/',
+ COBRAND_FEATURES => {
+ extra_state_mapping => {
+ northamptonshire => {
+ investigating => {
+ further => 'Under further investigation'
+ }
+ }
+ }
+ }
+ }, sub {
+ $mech->get_ok('/report/' . $comment->problem_id);
+ };
+
+ $mech->content_contains('Under further investigation');
+
+ FixMyStreet::override_config {
+ ALLOWED_COBRANDS => [ { northamptonshire => '.' } ],
+ MAPIT_URL => 'http://mapit.uk/',
+ COBRAND_FEATURES => {
+ extra_state_mapping => {
+ northamptonshire => {
+ fixed => {
+ further => 'Under further investigation'
+ }
+ },
+ fixmystreet => {
+ 'Northamptonshire County Council' => {
+ fixed => {
+ further => 'Under further investigation'
+ }
+ }
+ }
+ }
+ }
+ }, sub {
+ $mech->get_ok('/report/' . $comment->problem_id);
+ };
+
+ $mech->content_contains('Investigating');
+ $mech->content_lacks('Under further investigation');
+
+ FixMyStreet::override_config {
+ ALLOWED_COBRANDS => [ { northamptonshire => '.' } ],
+ MAPIT_URL => 'http://mapit.uk/',
+ }, sub {
+ $mech->get_ok('/report/' . $comment->problem_id);
+ };
+
+ $mech->content_contains('Investigating');
+ $mech->content_lacks('Under further investigation');
+
+ FixMyStreet::override_config {
+ ALLOWED_COBRANDS => [ { fixmystreet => '.' } ],
+ MAPIT_URL => 'http://mapit.uk/',
+ COBRAND_FEATURES => {
+ extra_state_mapping => {
+ northamptonshire => {
+ investigating => {
+ further => 'Under further investigation'
+ }
+ },
+ fixmystreet => {
+ 'Northamptonshire County Council' => {
+ investigating => {
+ further => 'Under further investigation'
+ }
+ }
+ }
+ }
+ }
}, sub {
$mech->get_ok('/report/' . $comment->problem_id);
};