From 1bb94cd0bf0821927b3f449d832a9982b0397fa9 Mon Sep 17 00:00:00 2001 From: Matthew Somerville Date: Wed, 31 May 2017 12:48:17 +0100 Subject: Auto-add strict/warnings/Test::More with TestMech. --- t/app/controller/index.t | 4 ---- 1 file changed, 4 deletions(-) (limited to 't/app/controller/index.t') diff --git a/t/app/controller/index.t b/t/app/controller/index.t index 6b28a03d2..91d0a8fcb 100644 --- a/t/app/controller/index.t +++ b/t/app/controller/index.t @@ -1,7 +1,3 @@ -use strict; -use warnings; -use Test::More; - use FixMyStreet::TestMech; my $mech = FixMyStreet::TestMech->new; -- cgit v1.2.3 From e57cbf483790bedfef6496be3c7ffa42882c3ffc Mon Sep 17 00:00:00 2001 From: Matthew Somerville Date: Tue, 13 Jun 2017 18:39:05 +0100 Subject: [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. --- t/app/controller/index.t | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 't/app/controller/index.t') diff --git a/t/app/controller/index.t b/t/app/controller/index.t index 91d0a8fcb..654ebfcce 100644 --- a/t/app/controller/index.t +++ b/t/app/controller/index.t @@ -71,7 +71,7 @@ ok $mech->get('/report/' . $edinburgh_problems[2]->id); is $mech->res->code, 403, 'page forbidden'; is $problem_rs->count, $num+5; -my $oxon = $mech->create_body_ok(2237, 'Oxfordshire County Council', id => 2237); +my $oxon = $mech->create_body_ok(2237, 'Oxfordshire County Council'); subtest "prefilters /around if user has categories" => sub { my $user = $mech->log_in_ok('test@example.com'); my $categories = [ -- cgit v1.2.3 From 3b72526db1cdb4695f61a188261351ddd2aea395 Mon Sep 17 00:00:00 2001 From: Matthew Somerville Date: Wed, 14 Jun 2017 13:59:43 +0100 Subject: Run each test file in a transaction. This means that the tests can be run in parallel. --- t/app/controller/index.t | 2 -- 1 file changed, 2 deletions(-) (limited to 't/app/controller/index.t') diff --git a/t/app/controller/index.t b/t/app/controller/index.t index 654ebfcce..be4da6034 100644 --- a/t/app/controller/index.t +++ b/t/app/controller/index.t @@ -88,7 +88,5 @@ subtest "prefilters /around if user has categories" => sub { }; END { - $mech->delete_problems_for_body( 2651 ); - $mech->delete_body($oxon); done_testing(); } -- cgit v1.2.3