aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2011-05-27 23:04:22 +0100
committerMatthew Somerville <matthew@mysociety.org>2011-05-27 23:04:22 +0100
commit03359409fe8becfa44c08cbccb3ed0b5e8e6e5ef (patch)
tree275dafc3a15ae87a0728a3f74d28776e2475f33c
parentca393af1d89f6ff98e6b0f44d506c8621e3b74cc (diff)
Old test fixes for London reporting from master branch.
-rwxr-xr-xbin/send-reports23
-rwxr-xr-xbin/test-run14
2 files changed, 30 insertions, 7 deletions
diff --git a/bin/send-reports b/bin/send-reports
index 90a6553eb..d51276e9d 100755
--- a/bin/send-reports
+++ b/bin/send-reports
@@ -264,6 +264,7 @@ foreach my $row (@$unsent) {
$result *= post_easthants_message(%h);
}
} elsif ($send_web eq 'london') {
+ $h{message} = construct_london_message(%h);
if (!$nomail) {
$result *= post_london_report(%h);
}
@@ -363,6 +364,27 @@ sub post_easthants_message {
# London
+sub construct_london_message {
+ my %h = @_;
+ return <<EOF,
+A user of FixMyStreet has submitted the following report of a local
+problem that they believe might require your attention.
+
+Subject: $h{title}
+
+Details: $h{detail}
+
+$h{fuzzy}, or to provide an update on the problem, please visit the
+following link:
+
+$h{url}
+
+$h{closest_address}
+Yours,
+The FixMyStreet team
+EOF
+}
+
sub post_london_report {
my %h = @_;
my $phone = $h{phone};
@@ -385,6 +407,7 @@ sub post_london_report {
'Customer.Email' => $h{email},
'Customer.Phone' => $phone,
'Customer.Mobile' => $mobile,
+ 'ProblemDescription' => $h{message},
);
if ($h{used_map}) {
$params{'Location.Latitude'} = $h{latitude};
diff --git a/bin/test-run b/bin/test-run
index 41af2fe10..58cf0b2ea 100755
--- a/bin/test-run
+++ b/bin/test-run
@@ -284,7 +284,7 @@ sub do_report {
my $postcode = 'SW1A 0AA';
my $messages = english_fms_messages();
my $x_coord = 3287;
- my $y_coord = 1112;
+ my $y_coord = 1113;
submit_report($postcode, $x_coord, $y_coord, 530268, 179545, 1, undef, $messages, '');
# Check that the report is now available through the AJAX interface
@@ -296,8 +296,8 @@ sub do_update {
set_base_url('');
my $postcode = 'ME15 6RS';
my $messages = english_fms_messages();
- my $x_coord = 3287;
- my $y_coord = 1112;
+ my $x_coord = 3570;
+ my $y_coord = 969;
submit_report($postcode, $x_coord, $y_coord, 575794, 156256, 1, undef, $messages, '');
$wth->browser_follow_link(text => 'view the problem on this site');
$wth->browser_submit_form(with_fields => { name => name_n(1),
@@ -348,17 +348,17 @@ sub do_import {
sub do_questionnaire {
- my $council_id = 2491;
- my $council_name = "Southwark Borough Council";
+ my $council_id = 2514;
+ my $council_name = "Birmingham City Council";
# set up a fake contact record for a council
create_fake_contact($council_id);
# submit a problem report
set_fms_date('2009-11-01');
- my $postcode = 'SE1';
+ my $postcode = 'B14';
my $messages = english_fms_messages();
- submit_report($postcode, 3307, 1116, 533484.251968504, 180025.4000508, 5, $council_id, $messages, '');
+ submit_report($postcode, 2529, 1738, 407903, 280322, 5, $council_id, $messages, '');
# send emails (for the report)
call_send_emails();