diff options
Diffstat (limited to 't/app/controller/report_new_open311.t')
-rw-r--r-- | t/app/controller/report_new_open311.t | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/t/app/controller/report_new_open311.t b/t/app/controller/report_new_open311.t index 55c5a92e8..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; -my $open311Conf = FixMyStreet::App->model('DB::Open311Conf')->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, @@ -24,7 +24,7 @@ my %contact_params = ( # Let's make some contacts to send things to! my $contact1 = FixMyStreet::App->model('DB::Contact')->find_or_create( { %contact_params, - area_id => 2651, # Edinburgh + body_id => 2651, # Edinburgh category => 'Street lighting', email => '100', extra => [ { description => 'Lamppost number', code => 'number', required => 'True' }, @@ -35,7 +35,7 @@ my $contact1 = FixMyStreet::App->model('DB::Contact')->find_or_create( { } ); my $contact2 = FixMyStreet::App->model('DB::Contact')->find_or_create( { %contact_params, - area_id => 2651, # Edinburgh + body_id => 2651, # Edinburgh category => 'Graffiti Removal', email => '101', } ); |