aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller/alert_new.t
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2011-05-12 13:14:23 +0100
committerStruan Donald <struan@exo.org.uk>2011-05-12 13:14:23 +0100
commita9b2134ef5c94a74f840315aee987bfc57680c69 (patch)
treedc7d36af4c6c1c5e2751d59a3c8930e99d2a9ab7 /t/app/controller/alert_new.t
parent105291154c3dfaa905202ff576c51097759094df (diff)
problem update alert subscription
Diffstat (limited to 't/app/controller/alert_new.t')
-rw-r--r--t/app/controller/alert_new.t18
1 files changed, 13 insertions, 5 deletions
diff --git a/t/app/controller/alert_new.t b/t/app/controller/alert_new.t
index c44d14a30..7cbf6188a 100644
--- a/t/app/controller/alert_new.t
+++ b/t/app/controller/alert_new.t
@@ -9,7 +9,7 @@ my $mech = FixMyStreet::TestMech->new;
foreach my $test (
{
email => 'test@example.com',
- type => 'area',
+ type => 'area_problems',
content => 'your alert will not be activated',
email_text => 'confirm the alert',
uri =>
@@ -18,7 +18,7 @@ foreach my $test (
},
{
email => 'test@example.com',
- type => 'council',
+ type => 'council_problems',
content => 'your alert will not be activated',
email_text => 'confirm the alert',
uri =>
@@ -28,7 +28,7 @@ foreach my $test (
},
{
email => 'test@example.com',
- type => 'ward',
+ type => 'ward_problems',
content => 'your alert will not be activated',
email_text => 'confirm the alert',
uri =>
@@ -38,20 +38,28 @@ foreach my $test (
},
{
email => 'test@example.com',
- type => 'local',
+ type => 'local_problems',
content => 'your alert will not be activated',
email_text => 'confirm the alert',
uri =>
'/alert/subscribe?type=local&rznvy=test@example.com&feed=local:10.2:20.1',
param1 => 10.2,
param2 => 20.1,
+ },
+ {
+ email => 'test@example.com',
+ type => 'new_updates',
+ content => 'your alert will not be activated',
+ email_text => 'confirm the alert',
+ uri => '/alert/subscribe?type=updates&rznvy=test@example.com&id=1',
+ param1 => 1,
}
)
{
subtest "$test->{type} alert correctly created" => sub {
$mech->clear_emails_ok;
- my $type = $test->{type} . '_problems';
+ my $type = $test->{type};
my $user =
FixMyStreet::App->model('DB::User')