aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2019-10-10 08:13:51 +0100
committerMatthew Somerville <matthew@mysociety.org>2019-10-10 08:25:05 +0100
commit12f5a59de622f268d6024a09d07d044f9eb5b5aa (patch)
tree8624660f02b0b2e4d4fc93093aa503a8f8daa8db /t/app/controller
parent68e18ffea411f6f6fbb0b4424c6aa6c14fd8cd00 (diff)
[Oxfordshire] Remove defect type front end code.
Diffstat (limited to 't/app/controller')
-rw-r--r--t/app/controller/report_inspect.t27
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');