diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2017-06-13 18:39:05 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2017-06-20 15:02:11 +0100 |
commit | e57cbf483790bedfef6496be3c7ffa42882c3ffc (patch) | |
tree | d01788502457f801a846cdac78213df5ecdf1ea5 /t/app/controller/report_inspect.t | |
parent | a5f311e5147621f285cf31647ce675c502095882 (diff) |
[UK] Remove requirement for fixed body IDs.
Historically in UK cobrands, bodies have had IDs the same as the MapIt
area ID they cover. This can be confusing (if you are setting up a dev
environment, say) and should not be necessary. This commit removes the
requirement entirely, by switching any ID checks to either the name of
the body, or the actual area it covers.
One note: the body name in the test has to match so that we do not get
two bodies both covering 2237 created. This will not be necessary when
the tests are compartmentalized in the next commit.
Diffstat (limited to 't/app/controller/report_inspect.t')
-rw-r--r-- | t/app/controller/report_inspect.t | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/t/app/controller/report_inspect.t b/t/app/controller/report_inspect.t index 8b375bfe4..a0407cb32 100644 --- a/t/app/controller/report_inspect.t +++ b/t/app/controller/report_inspect.t @@ -2,8 +2,8 @@ use FixMyStreet::TestMech; my $mech = FixMyStreet::TestMech->new; -my $brum = $mech->create_body_ok(2514, 'Birmingham City Council', id => 2514); -my $oxon = $mech->create_body_ok(2237, 'Oxfordshire County Council', id => 2237); +my $brum = $mech->create_body_ok(2514, 'Birmingham City Council'); +my $oxon = $mech->create_body_ok(2237, 'Oxfordshire County Council'); my $contact = $mech->create_contact_ok( body_id => $oxon->id, category => 'Cows', email => 'cows@example.net' ); my $rp = FixMyStreet::DB->resultset("ResponsePriority")->create({ body => $oxon, @@ -13,7 +13,7 @@ FixMyStreet::DB->resultset("ContactResponsePriority")->create({ contact => $contact, response_priority => $rp, }); -my $wodc = $mech->create_body_ok(2420, 'West Oxfordshire District Council', id => 2420); +my $wodc = $mech->create_body_ok(2420, 'West Oxfordshire District Council'); $mech->create_contact_ok( body_id => $wodc->id, category => 'Horses', email => 'horses@example.net' ); |