diff options
Diffstat (limited to 't/app')
-rw-r--r-- | t/app/controller/admin.t | 10 | ||||
-rw-r--r-- | t/app/controller/alert_new.t | 6 | ||||
-rw-r--r-- | t/app/controller/around.t | 2 | ||||
-rw-r--r-- | t/app/controller/index.t | 4 | ||||
-rw-r--r-- | t/app/controller/json.t | 2 | ||||
-rw-r--r-- | t/app/controller/questionnaire.t | 2 | ||||
-rw-r--r-- | t/app/controller/report_display.t | 4 | ||||
-rw-r--r-- | t/app/controller/report_interest_count.t | 4 | ||||
-rw-r--r-- | t/app/controller/report_new.t | 8 | ||||
-rw-r--r-- | t/app/controller/report_updates.t | 4 | ||||
-rw-r--r-- | t/app/controller/reports.t | 8 |
11 files changed, 27 insertions, 27 deletions
diff --git a/t/app/controller/admin.t b/t/app/controller/admin.t index 71a391c59..9cea85861 100644 --- a/t/app/controller/admin.t +++ b/t/app/controller/admin.t @@ -45,7 +45,7 @@ my $dt = DateTime->new( my $report = FixMyStreet::App->model('DB::Problem')->find_or_create( { postcode => 'SW1A 1AA', - council => '2504', + bodies_str => '2504', areas => ',105255,11806,11828,2247,2504,', category => 'Other', title => 'Report to Edit', @@ -84,7 +84,7 @@ subtest 'check summary counts' => sub { my $problem_count = $problems->count; $problems->update( { cobrand => '' } ); - FixMyStreet::App->model('DB::Problem')->search( { council => 2489 } )->update( { council => 1 } ); + FixMyStreet::App->model('DB::Problem')->search( { bodies_str => 2489 } )->update( { bodies_str => 1 } ); my $q = FixMyStreet::App->model('DB::Questionnaire')->find_or_new( { problem => $report, }); $q->whensent( \'ms_current_timestamp()' ); @@ -118,7 +118,7 @@ subtest 'check summary counts' => sub { my ($num_alerts) = $mech->content =~ /(\d+) confirmed alerts/; my ($num_qs) = $mech->content =~ /(\d+) questionnaires sent/; - $report->council(2489); + $report->bodies_str(2489); $report->cobrand('barnet'); $report->update; @@ -131,7 +131,7 @@ subtest 'check summary counts' => sub { $mech->content_contains( ($num_alerts+1) . " confirmed alerts" ); $mech->content_contains( ($num_qs+1) . " questionnaires sent" ); - $report->council(2504); + $report->bodies_str(2504); $report->cobrand(''); $report->update; @@ -139,7 +139,7 @@ subtest 'check summary counts' => sub { $alert->update; } - FixMyStreet::App->model('DB::Problem')->search( { council => 1 } )->update( { council => 2489 } ); + FixMyStreet::App->model('DB::Problem')->search( { bodies_str => 1 } )->update( { bodies_str => 2489 } ); ok $mech->host('fixmystreet.com'); }; diff --git a/t/app/controller/alert_new.t b/t/app/controller/alert_new.t index c849b9485..6f130279b 100644 --- a/t/app/controller/alert_new.t +++ b/t/app/controller/alert_new.t @@ -382,7 +382,7 @@ subtest "Test normal alert signups and that alerts are sent" => sub { my $report_time = '2011-03-01 12:00:00'; my $report = FixMyStreet::App->model('DB::Problem')->find_or_create( { postcode => 'EH1 1BB', - council => '2651', + bodies_str => '2651', areas => ',11808,135007,14419,134935,2651,20728,', category => 'Street lighting', title => 'Testing', @@ -532,7 +532,7 @@ for my $test ( my $report = FixMyStreet::App->model('DB::Problem')->find_or_create( { postcode => 'EH1 1BB', - council => '2651', + bodies_str => '2651', areas => ',11808,135007,14419,134935,2651,20728,', category => 'Street lighting', title => 'Alert test for non public reports', @@ -590,7 +590,7 @@ subtest 'check new updates alerts for non public reports only go to report owner my $report = FixMyStreet::App->model('DB::Problem')->find_or_create( { postcode => 'EH1 1BB', - council => '2651', + bodies_str => '2651', areas => ',11808,135007,14419,134935,2651,20728,', category => 'Street lighting', title => 'Alert test for non public reports', diff --git a/t/app/controller/around.t b/t/app/controller/around.t index d973543ce..0f01a9ea9 100644 --- a/t/app/controller/around.t +++ b/t/app/controller/around.t @@ -90,7 +90,7 @@ subtest 'check non public reports are not displayed on around page' => sub { longitude => -3.17492254484, }; my @edinburgh_problems = - $mech->create_problems_for_council( 5, 2651, 'Around page', $params ); + $mech->create_problems_for_body( 5, 2651, 'Around page', $params ); $mech->get_ok('/'); $mech->submit_form_ok( { with_fields => { pc => 'EH99 1SP' } }, diff --git a/t/app/controller/index.t b/t/app/controller/index.t index 462b21064..47c08291f 100644 --- a/t/app/controller/index.t +++ b/t/app/controller/index.t @@ -55,12 +55,12 @@ subtest "does pc, (x,y), (e,n) or (lat,lon) go to /around" => sub { } }; -$mech->delete_problems_for_council( 2651 ); +$mech->delete_problems_for_body( 2651 ); my $problem_rs = FixMyStreet::App->model('DB::Problem'); my $num = $problem_rs->count; -my @edinburgh_problems = $mech->create_problems_for_council(5, 2651, 'Front page'); +my @edinburgh_problems = $mech->create_problems_for_body(5, 2651, 'Front page'); is scalar @edinburgh_problems, 5, 'correct number of edinburgh problems created'; $mech->get_ok('/report/' . $edinburgh_problems[2]->id); diff --git a/t/app/controller/json.t b/t/app/controller/json.t index 468fa5b31..e8f9c0e09 100644 --- a/t/app/controller/json.t +++ b/t/app/controller/json.t @@ -47,7 +47,7 @@ my $user = $mech->create_user_ok('test@example.com'); my $problem_args = { postcode => 'sw1a 1aa', - council => '2501', + bodies_str => '2501', areas => ',105164,11806,11827,2247,2501,34817,42011,66045,70786,8519,', category => 'test category', title => 'Test title', diff --git a/t/app/controller/questionnaire.t b/t/app/controller/questionnaire.t index 3a6a3d6ad..a99f4c645 100644 --- a/t/app/controller/questionnaire.t +++ b/t/app/controller/questionnaire.t @@ -30,7 +30,7 @@ my $sent_time = $sent->ymd . ' ' . $sent->hms; my $report = FixMyStreet::App->model('DB::Problem')->find_or_create( { postcode => 'EH1 1BB', - council => '2651', + bodies_str => '2651', areas => ',11808,135007,14419,134935,2651,20728,', category => 'Street lighting', title => 'Testing', diff --git a/t/app/controller/report_display.t b/t/app/controller/report_display.t index 39f1b59a7..b20fe4077 100644 --- a/t/app/controller/report_display.t +++ b/t/app/controller/report_display.t @@ -377,7 +377,7 @@ for my $test ( $user->update; $report->discard_changes; - $report->council( $test->{report_council} ); + $report->bodies_str( $test->{report_council} ); $report->update; $mech->get_ok("/report/$report_id"); @@ -391,7 +391,7 @@ for my $test ( } $report->discard_changes; -$report->council( 2504 ); +$report->bodies_str( 2504 ); $report->update; # tidy up diff --git a/t/app/controller/report_interest_count.t b/t/app/controller/report_interest_count.t index 0a8a5ac0b..788d2c473 100644 --- a/t/app/controller/report_interest_count.t +++ b/t/app/controller/report_interest_count.t @@ -85,7 +85,7 @@ SKIP: { $user->update; $report->discard_changes; - $report->council( $test->{report_council} ); + $report->bodies_str( $test->{report_council} ); $report->update; $mech->get_ok("/report/$report_id"); @@ -135,7 +135,7 @@ subtest 'check support details not shown if not enabled in cobrand' => sub { }; $report->discard_changes; -$report->council( 2504 ); +$report->bodies_str( 2504 ); $report->update; # tidy up diff --git a/t/app/controller/report_new.t b/t/app/controller/report_new.t index 92943bde9..323abfa18 100644 --- a/t/app/controller/report_new.t +++ b/t/app/controller/report_new.t @@ -503,7 +503,7 @@ foreach my $test ( is $mech->get( '/report/' . $report->id )->code, 404, "report not found"; # Check the report has been assigned appropriately - is $report->council, 2651; + is $report->bodies_str, 2651; # receive token my $email = $mech->get_email; @@ -659,7 +659,7 @@ subtest "test report creation for a user who is signing in as they report" => su is $mech->uri->path, "/report/" . $report->id, "redirected to report page"; # Check the report has been assigned appropriately - is $report->council, 2651; + is $report->bodies_str, 2651; # check that no emails have been sent $mech->email_count_is(0); @@ -750,7 +750,7 @@ foreach my $test ( ok $report, "Found the report"; # Check the report has been assigned appropriately - is $report->council, $test->{council}; + is $report->bodies_str, $test->{council}; # check that we got redirected to /report/ is $mech->uri->path, "/report/" . $report->id, "redirected to report page"; @@ -1116,7 +1116,7 @@ SKIP: { ok $report, "Found the report"; # Check the report has been assigned appropriately - is $report->council, 2240; + is $report->bodies_str, 2240; # receive token my $email = $mech->get_email; diff --git a/t/app/controller/report_updates.t b/t/app/controller/report_updates.t index 2c7294222..2d49d3eef 100644 --- a/t/app/controller/report_updates.t +++ b/t/app/controller/report_updates.t @@ -553,7 +553,7 @@ for my $test ( subtest $test->{desc} => sub { $report->comments->delete; if ( $test->{ report_councils } ) { - $report->council( $test->{ report_councils } ); + $report->bodies_str( $test->{ report_councils } ); $report->update; } @@ -633,7 +633,7 @@ $user->from_body(0); $user->update; $report->state('confirmed'); -$report->council('2504'); +$report->bodies_str('2504'); $report->update; for my $test ( diff --git a/t/app/controller/reports.t b/t/app/controller/reports.t index a4dab6597..74e4e3d71 100644 --- a/t/app/controller/reports.t +++ b/t/app/controller/reports.t @@ -8,11 +8,11 @@ use DateTime; ok( my $mech = FixMyStreet::TestMech->new, 'Created mech object' ); -$mech->delete_problems_for_council( 2504 ); -$mech->delete_problems_for_council( 2651 ); +$mech->delete_problems_for_body( 2504 ); +$mech->delete_problems_for_body( 2651 ); -my @edinburgh_problems = $mech->create_problems_for_council(3, 2651, 'All reports'); -my @westminster_problems = $mech->create_problems_for_council(5, 2504, 'All reports'); +my @edinburgh_problems = $mech->create_problems_for_body(3, 2651, 'All reports'); +my @westminster_problems = $mech->create_problems_for_body(5, 2504, 'All reports'); is scalar @westminster_problems, 5, 'correct number of westminster problems created'; is scalar @edinburgh_problems, 3, 'correct number of edinburgh problems created'; |