diff options
Diffstat (limited to 't/app/controller')
-rw-r--r-- | t/app/controller/report_inspect.t | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/t/app/controller/report_inspect.t b/t/app/controller/report_inspect.t index d319f778a..b6498e840 100644 --- a/t/app/controller/report_inspect.t +++ b/t/app/controller/report_inspect.t @@ -8,14 +8,6 @@ my $oxon = $mech->create_body_ok(2237, 'Oxfordshire County Council', { can_be_de my $contact = $mech->create_contact_ok( body_id => $oxon->id, category => 'Cows', email => 'cows@example.net' ); my $contact2 = $mech->create_contact_ok( body_id => $oxon->id, category => 'Sheep', email => 'SHEEP', send_method => 'Open311' ); my $contact3 = $mech->create_contact_ok( body_id => $oxon->id, category => 'Badgers', email => 'badgers@example.net' ); -my $dt = FixMyStreet::DB->resultset("DefectType")->create({ - body => $oxon, - name => 'Small Defect', description => "Teeny", -}); -FixMyStreet::DB->resultset("ContactDefectType")->create({ - contact => $contact, - defect_type => $dt, -}); my $rp = FixMyStreet::DB->resultset("ResponsePriority")->create({ body => $oxon, name => 'High Priority', @@ -443,24 +435,6 @@ FixMyStreet::override_config { is $report->response_priority->id, $rp->id, 'response priority set'; }; - subtest "check can set defect type for category when changing from category with no defect types" => sub { - $report->update({ category => 'Sheep', defect_type_id => undef }); - $user->user_body_permissions->delete; - $user->user_body_permissions->create({ body => $oxon, permission_type => 'report_inspect' }); - $mech->get_ok("/report/$report_id"); - $mech->submit_form_ok({ - button => 'save', - with_fields => { - include_update => 0, - defect_type => $dt->id, - category => 'Cows', - } - }); - $report->discard_changes; - is $report->defect_type->id, $dt->id, 'defect type set'; - $report->update({ defect_type_id => undef }); - }; - subtest "check can't set priority that isn't for a category" => sub { $report->discard_changes; $report->update({ category => 'Cows', response_priority_id => $rp->id }); @@ -683,7 +657,6 @@ FixMyStreet::override_config { priority => $rp->id, include_update => '1', detailed_information => 'XXX164XXXxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', - defect_type => '', traffic_information => '' }; my $values = $mech->visible_form_values('report_inspect_form'); |