aboutsummaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2015-03-13 18:06:55 +0000
committerMatthew Somerville <matthew@mysociety.org>2015-03-13 21:54:29 +0000
commitd0a16157fbd10f8bdf1a07c77331504c61bf7f5d (patch)
treef0401ba3397536b02a0d63eafdec4c8fda4bcf38 /t
parent76e533bd318cb4208faa1bf5cd0c00bde9e08e6c (diff)
[fixmystreet.com] Remove special Report-It code.
Diffstat (limited to 't')
-rw-r--r--t/app/controller/report_import.t12
-rw-r--r--t/app/controller/report_new.t5
-rw-r--r--t/cobrand/get_body_sender.t3
3 files changed, 17 insertions, 3 deletions
diff --git a/t/app/controller/report_import.t b/t/app/controller/report_import.t
index 0631b4209..ff6508149 100644
--- a/t/app/controller/report_import.t
+++ b/t/app/controller/report_import.t
@@ -17,7 +17,17 @@ ok -e $sample_file, "sample file $sample_file exists";
FixMyStreet::App->log->disable('info');
END { FixMyStreet::App->log->enable('info'); }
-$mech->create_body_ok(2504, 'Westminster City Council');
+my $body = $mech->create_body_ok(2504, 'Westminster City Council');
+$mech->create_contact_ok(
+ body_id => $body->id,
+ category => 'Street lighting',
+ email => 'streetlighting@example.com',
+);
+$mech->create_contact_ok(
+ body_id => $body->id,
+ category => 'Potholes',
+ email => 'highways@example.com',
+);
# submit an empty report to import - check we get all errors
subtest "Test creating bad partial entries" => sub {
diff --git a/t/app/controller/report_new.t b/t/app/controller/report_new.t
index 761fdad30..25fa01a1f 100644
--- a/t/app/controller/report_new.t
+++ b/t/app/controller/report_new.t
@@ -88,6 +88,11 @@ my $contact7 = $mech->create_contact_ok(
category => 'Street lighting',
email => 'highways@example.com',
);
+my $contact8 = $mech->create_contact_ok(
+ body_id => $body_ids{2504},
+ category => 'Street lighting',
+ email => 'highways@example.com'
+);
# test that the various bit of form get filled in and errors correctly
# generated.
diff --git a/t/cobrand/get_body_sender.t b/t/cobrand/get_body_sender.t
index 964f5c0e4..a9ba49479 100644
--- a/t/cobrand/get_body_sender.t
+++ b/t/cobrand/get_body_sender.t
@@ -26,9 +26,8 @@ FixMyStreet::override_config {
MAPIT_URL => 'http://mapit.mysociety.org/',
}, sub {
is_deeply $c->get_body_sender( $body ), { method => 'Email' }, 'defaults to email';
-
$body_area->update({ area_id => 2481 }); # Croydon LBO
- is_deeply $c->get_body_sender( $body ), { method => 'London' }, 'returns london report it if London borough';
+ is_deeply $c->get_body_sender( $body ), { method => 'Email' }, 'still email if London borough';
};
$body->send_method( 'TestMethod' );