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/cobrand | |
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/cobrand')
-rw-r--r-- | t/cobrand/bromley.t | 2 | ||||
-rw-r--r-- | t/cobrand/oxfordshire.t | 2 | ||||
-rw-r--r-- | t/cobrand/two_tier.t | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/t/cobrand/bromley.t b/t/cobrand/bromley.t index 0a0ac5163..ad0ef7b14 100644 --- a/t/cobrand/bromley.t +++ b/t/cobrand/bromley.t @@ -4,7 +4,7 @@ my $mech = FixMyStreet::TestMech->new; # Create test data my $user = $mech->create_user_ok( 'bromley@example.com' ); -my $body = $mech->create_body_ok( 2482, 'Bromley Council', id => 2482 ); +my $body = $mech->create_body_ok( 2482, 'Bromley Council'); my $contact = $mech->create_contact_ok( body_id => $body->id, category => 'Other', diff --git a/t/cobrand/oxfordshire.t b/t/cobrand/oxfordshire.t index fad41be31..7a7d85412 100644 --- a/t/cobrand/oxfordshire.t +++ b/t/cobrand/oxfordshire.t @@ -1,7 +1,7 @@ use FixMyStreet::TestMech; my $mech = FixMyStreet::TestMech->new; -my $oxon = $mech->create_body_ok(2237, 'Oxfordshire County Council', id => 2237); +my $oxon = $mech->create_body_ok(2237, 'Oxfordshire County Council'); subtest 'check /ajax defaults to open reports only' => sub { my $categories = [ 'Bridges', 'Fences', 'Manhole' ]; diff --git a/t/cobrand/two_tier.t b/t/cobrand/two_tier.t index 97bbccc01..6c6a36758 100644 --- a/t/cobrand/two_tier.t +++ b/t/cobrand/two_tier.t @@ -19,8 +19,8 @@ FixMyStreet::override_config { for my $c (@cobrands) { my ($m, $id) = @$c; my $cobrand = FixMyStreet::Cobrand->get_class_for_moniker($m); - my $council_id = $cobrand->council_id; - is $council_id, $id, "council_id for $m"; + my $council_area_id = $cobrand->council_area_id; + is $council_area_id, $id, "council_area_id for $m"; } }; |