diff options
Diffstat (limited to 't/app/controller')
-rw-r--r-- | t/app/controller/auth_social.t | 9 | ||||
-rw-r--r-- | t/app/controller/dashboard.t | 14 |
2 files changed, 12 insertions, 11 deletions
diff --git a/t/app/controller/auth_social.t b/t/app/controller/auth_social.t index f5f64248c..d0ee4e148 100644 --- a/t/app/controller/auth_social.t +++ b/t/app/controller/auth_social.t @@ -56,9 +56,12 @@ for my $test ( }, { type => 'oidc', config => { - ALLOWED_COBRANDS => [ { westminster => '.' } ], + ALLOWED_COBRANDS => 'westminster', MAPIT_URL => 'http://mapit.uk/', COBRAND_FEATURES => { + anonymous_account => { + westminster => 'test', + }, oidc_login => { westminster => { client_id => 'example_client_id', @@ -385,6 +388,4 @@ for my $tw_state ( 'refused', 'existing UID', 'no email' ) { }; -END { - done_testing(); -} +done_testing(); diff --git a/t/app/controller/dashboard.t b/t/app/controller/dashboard.t index ff8d1a9d5..061809aaf 100644 --- a/t/app/controller/dashboard.t +++ b/t/app/controller/dashboard.t @@ -46,9 +46,13 @@ my @scheduled_problems = $mech->create_problems_for_body(7, $body->id, 'Title', my @fixed_problems = $mech->create_problems_for_body(4, $body->id, 'Title', { areas => ",$area_id,2651,", category => 'Potholes', cobrand => 'fixmystreet' }); my @closed_problems = $mech->create_problems_for_body(3, $body->id, 'Title', { areas => ",$area_id,2651,", category => 'Traffic lights', cobrand => 'fixmystreet' }); +my $first_problem_id; +my $first_update_id; foreach my $problem (@scheduled_problems) { $problem->update({ state => 'action scheduled' }); - $mech->create_comment_for_problem($problem, $counciluser, 'Title', 'text', 0, 'confirmed', 'action scheduled'); + my ($update) = $mech->create_comment_for_problem($problem, $counciluser, 'Title', 'text', 0, 'confirmed', 'action scheduled'); + $first_problem_id = $problem->id unless $first_problem_id; + $first_update_id = $update->id unless $first_update_id; } foreach my $problem (@fixed_problems) { @@ -56,13 +60,9 @@ foreach my $problem (@fixed_problems) { $mech->create_comment_for_problem($problem, $counciluser, 'Title', 'text', 0, 'confirmed', 'fixed'); } -my $first_problem_id; -my $first_update_id; foreach my $problem (@closed_problems) { $problem->update({ state => 'closed' }); - my ($update) = $mech->create_comment_for_problem($problem, $counciluser, 'Title', 'text', 0, 'confirmed', 'closed', { confirmed => \'current_timestamp' }); - $first_problem_id = $problem->id unless $first_problem_id; - $first_update_id = $update->id unless $first_update_id; + $mech->create_comment_for_problem($problem, $counciluser, 'Title', 'text', 0, 'confirmed', 'closed'); } my $categories = scraper { @@ -218,7 +218,7 @@ FixMyStreet::override_config { is $rows[1]->[0], $first_problem_id, 'Correct report ID'; is $rows[1]->[1], $first_update_id, 'Correct update ID'; is $rows[1]->[3], 'confirmed', 'Correct state'; - is $rows[1]->[4], 'closed', 'Correct problem state'; + is $rows[1]->[4], 'action scheduled', 'Correct problem state'; is $rows[1]->[5], 'text', 'Correct text'; is $rows[1]->[6], 'Title', 'Correct name'; }; |