diff options
author | Struan Donald <struan@exo.org.uk> | 2011-05-26 14:33:50 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2011-05-26 14:33:50 +0100 |
commit | 408b256e4f863a43c4f81209106b4ac23aaa666a (patch) | |
tree | 24682056ebcd864676095583a3656eebc186a905 /t/app/controller/alert_new.t | |
parent | 0030a9d9760c1f8733fb5b64486aaa634d1023bb (diff) |
If the user already exists in the database then don't sent them a
confirmation email when signing up to alerts
Diffstat (limited to 't/app/controller/alert_new.t')
-rw-r--r-- | t/app/controller/alert_new.t | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/t/app/controller/alert_new.t b/t/app/controller/alert_new.t index 7cbf6188a..4b23cb950 100644 --- a/t/app/controller/alert_new.t +++ b/t/app/controller/alert_new.t @@ -181,7 +181,7 @@ foreach my $test ( alert_type => $type, parameter => $test->{param1}, parameter2 => $test->{param2}, - confirmed => 0, + confirmed => 1, } ); @@ -209,6 +209,8 @@ foreach my $test ( $mech->log_in_ok( $test->{email} ); + $mech->clear_emails_ok; + my $alert; if ($user) { $alert = FixMyStreet::App->model('DB::Alert')->find( @@ -237,11 +239,14 @@ foreach my $test ( alert_type => $type, parameter => $test->{param1}, parameter2 => $test->{param2}, - confirmed => 0, + confirmed => 1, } ); ok $alert, 'New alert created with existing user'; + + $mech->email_count_is(0); + }; } |