diff options
Diffstat (limited to 't')
-rw-r--r-- | t/app/controller/report_inspect.t | 2 | ||||
-rw-r--r-- | t/cobrand/oxfordshire.t | 5 |
2 files changed, 7 insertions, 0 deletions
diff --git a/t/app/controller/report_inspect.t b/t/app/controller/report_inspect.t index 367327c16..d5eaed2c1 100644 --- a/t/app/controller/report_inspect.t +++ b/t/app/controller/report_inspect.t @@ -920,10 +920,12 @@ FixMyStreet::override_config { $mech->submit_form_ok({ button => 'save', with_fields => { public_update => "This is a public update.", include_update => "1", state => 'action scheduled', raise_defect => 1, + defect_item_category => 'Kerbing', } }); $report2->discard_changes; is $report2->get_extra_metadata('inspected'), 1, 'report marked as inspected'; $mech->get_ok("/report/$report2_id"); + $mech->content_like(qr/Defect category<\/dt>\s*<dd>Kerbing/); my $meta = $mech->extract_update_metas; like $meta->[0], qr/State changed to: Action scheduled/, 'First update mentions action scheduled'; like $meta->[1], qr/Posted by .*defect raised/, 'Update mentions defect raised'; diff --git a/t/cobrand/oxfordshire.t b/t/cobrand/oxfordshire.t index b5e51e808..8a1ad1429 100644 --- a/t/cobrand/oxfordshire.t +++ b/t/cobrand/oxfordshire.t @@ -184,6 +184,10 @@ FixMyStreet::override_config { $comment->set_extra_metadata(defect_raised => 1); $comment->update; $comment->problem->external_id('hey'); + $comment->problem->set_extra_metadata(defect_location_description => 'Location'); + $comment->problem->set_extra_metadata(defect_item_category => 'Kerbing'); + $comment->problem->set_extra_metadata(defect_item_type => 'Damaged'); + $comment->problem->set_extra_metadata(defect_item_detail => '1 kerb unit or 1 linear m'); $comment->problem->update; my $cbr = Test::MockModule->new('FixMyStreet::Cobrand::Oxfordshire'); @@ -210,6 +214,7 @@ FixMyStreet::override_config { my $cgi = CGI::Simple->new($o->test_req_used->content); is $cgi->param('attribute[usrn]'), 13579, 'USRN sent with update'; is $cgi->param('attribute[raise_defect]'), 1, 'Defect flag sent with update'; + is $cgi->param('attribute[defect_item_category]'), 'Kerbing'; # Now set a USRN on the problem (found at submission) $comment->problem->push_extra_fields({ name => 'usrn', value => '12345' }); |