aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller/report_new.t
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2011-06-06 09:20:38 +0100
committerStruan Donald <struan@exo.org.uk>2011-06-06 09:20:38 +0100
commit819a95ae17f59f1732379926f9738caeb9ff046b (patch)
tree743c52675d1738618557f46f853ac46dd8b8530f /t/app/controller/report_new.t
parente26bc99396d3eaefc3fd7d81c010dc4028767690 (diff)
parentb388fd0be5296426225089ed188b3c1cdd802415 (diff)
Merge branch 'migrate_to_catalyst' of ssh://git.mysociety.org/data/git/public/fixmystreet into migrate_to_catalyst
Diffstat (limited to 't/app/controller/report_new.t')
-rw-r--r--t/app/controller/report_new.t17
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;