aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller
diff options
context:
space:
mode:
Diffstat (limited to 't/app/controller')
-rw-r--r--t/app/controller/admin.t4
-rw-r--r--t/app/controller/report_new_open311.t12
2 files changed, 8 insertions, 8 deletions
diff --git a/t/app/controller/admin.t b/t/app/controller/admin.t
index d759c1238..d8b721ca9 100644
--- a/t/app/controller/admin.t
+++ b/t/app/controller/admin.t
@@ -259,7 +259,7 @@ subtest 'check open311 configuring' => sub {
$mech->content_contains('Configuration updated - contacts will be generated automatically later');
my $open311 =
- FixMyStreet::App->model('DB::Body')->search( { area_id => 2650 } );
+ FixMyStreet::App->model('DB::Body')->search( { 'body_areas.area_id' => 2650 }, { join => 'body_areas' } );
is $open311->count, 1, 'only one configuration';
my $conf = $open311->first;
@@ -283,7 +283,7 @@ subtest 'check open311 configuring' => sub {
$mech->content_contains('Configuration updated');
$open311 =
- FixMyStreet::App->model('DB::Body')->search( { area_id => 2650 } );
+ FixMyStreet::App->model('DB::Body')->search( { 'body_areas.area_id' => 2650 }, { join => 'body_areas' } );
is $open311->count, 1, 'only one configuration';
$conf = $open311->first;
diff --git a/t/app/controller/report_new_open311.t b/t/app/controller/report_new_open311.t
index e9ada9f41..22d2d1f97 100644
--- a/t/app/controller/report_new_open311.t
+++ b/t/app/controller/report_new_open311.t
@@ -7,12 +7,12 @@ use Web::Scraper;
my $mech = FixMyStreet::TestMech->new;
-FixMyStreet::App->model('DB::Body')->find_or_create( {
- area_id => 2651,
- endpoint => 'http://example.com/open311',
- jurisdiction => 'mySociety',
- api_key => 'apikey',
-} );
+my $body = $mech->create_body_ok(2651, 'City of Edinburgh Council');
+$body->update({
+ endpoint => 'http://example.com/open311',
+ jurisdiction => 'mySociety',
+ api_key => 'apikey',
+});
my %contact_params = (
confirmed => 1,