aboutsummaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2020-07-09 09:32:10 +0100
committerMatthew Somerville <matthew@mysociety.org>2020-07-09 09:32:10 +0100
commit8ab6e6105a967999dbc766d4a3fd150f5fe2c748 (patch)
tree47f07359872d5cd1024f4a6a32df9ab48a302de9 /t
parent0bce7c37e58e47bc3b2b864fe3fdd4072871827d (diff)
parenteb85d0df6cfcdfa5eb7833c53d704967e3df761a (diff)
Merge branch 'he-category-interactions'
Diffstat (limited to 't')
-rw-r--r--t/cobrand/bucks.t18
1 files changed, 17 insertions, 1 deletions
diff --git a/t/cobrand/bucks.t b/t/cobrand/bucks.t
index 230a52f99..36e149a13 100644
--- a/t/cobrand/bucks.t
+++ b/t/cobrand/bucks.t
@@ -112,7 +112,6 @@ subtest 'pothole on road not sent to extra email, only confirm sent' => sub {
is $report->external_id, 248, 'Report has right external ID';
};
-
# report made in Flytipping category off road should get moved to other category
subtest 'Flytipping not on a road gets recategorised' => sub {
$mech->log_in_ok($publicuser->email);
@@ -129,6 +128,23 @@ subtest 'Flytipping not on a road gets recategorised' => sub {
my $report = FixMyStreet::DB->resultset("Problem")->search(undef, { order_by => { -desc => 'id' } })->first;
ok $report, "Found the report";
is $report->category, "Flytipping (off-road)", 'Report was recategorised correctly';
+};
+
+subtest 'Flytipping not on a road going to HE does not get recategorised' => sub {
+ $mech->get_ok('/report/new?latitude=51.615559&longitude=-0.556903&category=Flytipping');
+ $mech->submit_form_ok({
+ with_fields => {
+ single_body_only => 'Highways England',
+ title => "Test Report",
+ detail => 'Test report details.',
+ category => 'Flytipping',
+ 'road-placement' => 'off-road',
+ }
+ }, "submit details");
+ $mech->content_contains('We don&rsquo;t handle this type of problem');
+ my $report = FixMyStreet::DB->resultset("Problem")->search(undef, { order_by => { -desc => 'id' } })->first;
+ ok $report, "Found the report";
+ is $report->category, "Flytipping", 'Report was not recategorised';
$mech->log_out_ok;
};