diff options
Diffstat (limited to 't/app/controller')
-rw-r--r-- | t/app/controller/report_new.t | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/t/app/controller/report_new.t b/t/app/controller/report_new.t index 760dfacc6..01c29ecf4 100644 --- a/t/app/controller/report_new.t +++ b/t/app/controller/report_new.t @@ -343,10 +343,17 @@ subtest "test report creation for a user who does not have an account" => sub { $mech->get_ok($url); $report->discard_changes; is $report->state, 'confirmed', "Report is now confirmed"; - is $report->state, 'confirmed', "report is now confirmed"; $mech->get_ok( '/report/' . $report->id ); + # check that the reporter has an alert + my $alert = FixMyStreet::App->model('DB::Alert')->find( { + user => $report->user, + alert_type => 'new_updates', + parameter => $report->id, + } ); + ok $alert, "created new alert"; + # user is created and logged in $mech->logged_in_ok; @@ -440,6 +447,14 @@ foreach my $test ( is $report->state, 'confirmed', "report is now confirmed"; $mech->get_ok( '/report/' . $report->id ); + # check that the reporter has an alert + my $alert = FixMyStreet::App->model('DB::Alert')->find( { + user => $report->user, + alert_type => 'new_updates', + parameter => $report->id, + } ); + ok $alert, "created new alert"; + # user is still logged in $mech->logged_in_ok; |