diff options
author | Matthew Somerville <matthew@mysociety.org> | 2013-02-01 15:28:08 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2013-02-04 06:53:02 +0000 |
commit | 488a8f21a0c1bc2b9501c9d94d69db56cccd80ae (patch) | |
tree | 68becf501e9492466a80015e8ace9a7fb1557cfa /t/app/controller/dashboard.t | |
parent | 3e0d12e8584d132b573f536ab5cd01e24241827b (diff) | |
parent | 28aa1dd7fb1c9bc93aa204afae67cf68fe36ee6b (diff) |
Merge remote branch 'origin/zurich'
Conflicts:
bin/open311-populate-service-list
bin/send-comments
bin/update-all-reports
conf/crontab.ugly
db/schema.sql
perllib/FixMyStreet/App/Controller/Admin.pm
perllib/FixMyStreet/App/Controller/Report/New.pm
perllib/FixMyStreet/App/Controller/Reports.pm
perllib/FixMyStreet/Cobrand/Default.pm
perllib/FixMyStreet/Cobrand/LichfieldDC.pm
perllib/FixMyStreet/DB/Result/Open311conf.pm
perllib/FixMyStreet/DB/Result/Problem.pm
perllib/FixMyStreet/DB/ResultSet/Problem.pm
perllib/FixMyStreet/SendReport.pm
perllib/FixMyStreet/SendReport/Email.pm
perllib/FixMyStreet/SendReport/Open311.pm
perllib/Open311/GetServiceRequestUpdates.pm
perllib/Open311/PopulateServiceList.pm
t/app/controller/report_new.t
t/app/controller/rss.t
templates/web/bromley/report/display.html
templates/web/default/admin/council_contacts.html
templates/web/default/common_header_tags.html
templates/web/default/dashboard/index.html
templates/web/default/front/stats.html
templates/web/default/report/_main.html
templates/web/default/report/update-form.html
templates/web/emptyhomes/index.html
templates/web/emptyhomes/report/display.html
templates/web/emptyhomes/report/new/councils_text_all.html
templates/web/emptyhomes/reports/body.html
templates/web/emptyhomes/reports/index.html
templates/web/fixmystreet/report/new/fill_in_details_form.html
templates/web/fixmystreet/report/update-form.html
web/cobrands/fixmystreet/fixmystreet.js
web/js/fixmystreet.js
Diffstat (limited to 't/app/controller/dashboard.t')
-rw-r--r-- | t/app/controller/dashboard.t | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/t/app/controller/dashboard.t b/t/app/controller/dashboard.t index 25e144464..091335040 100644 --- a/t/app/controller/dashboard.t +++ b/t/app/controller/dashboard.t @@ -12,6 +12,8 @@ my $test_pass = 'password'; my $test_council = 2651; my $test_ward = 20723; +$mech->create_body_ok($test_council, 'City of Edinburgh Council'); + $mech->delete_user( $test_user ); my $user = FixMyStreet::App->model('DB::User')->create( { email => $test_user, @@ -33,7 +35,7 @@ $mech->submit_form( is $mech->status, '404', 'If not council user get 404'; -$user->from_council( $test_council ); +$user->from_body( $test_council ); $user->update; $mech->log_out_ok; @@ -44,7 +46,7 @@ $mech->submit_form_ok( { $mech->content_contains( 'City of Edinburgh' ); -FixMyStreet::App->model('DB::Contact')->search( { area_id => $test_council } ) +FixMyStreet::App->model('DB::Contact')->search( { body_id => $test_council } ) ->delete; delete_problems(); @@ -53,7 +55,7 @@ my @cats = qw( Grafitti Litter Potholes Other ); for my $contact ( @cats ) { FixMyStreet::App->model('DB::Contact')->create( { - area_id => $test_council, + body_id => $test_council, category => $contact, email => "$contact\@example.org", confirmed => 1, @@ -608,7 +610,7 @@ sub make_problem { confirmed => $args->{conf_dt}, whensent => $args->{conf_dt}, lastupdate => $args->{mark_dt} || $args->{conf_dt}, - council => $test_council, + bodies_str => $test_council, postcode => 'EH99 1SP', latitude => '51', longitude => '1', @@ -662,10 +664,10 @@ sub check_report_counts { sub delete_problems { FixMyStreet::App->model('DB::Comment') - ->search( { 'problem.council' => $test_council }, { join => 'problem' } ) + ->search( { 'problem.bodies_str' => $test_council }, { join => 'problem' } ) ->delete; FixMyStreet::App->model('DB::Problem') - ->search( { council => $test_council } )->delete(); + ->search( { bodies_str => $test_council } )->delete(); } done_testing; |