aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller/report_updates.t
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2011-09-08 10:05:06 +0100
committerStruan Donald <struan@exo.org.uk>2011-09-08 10:05:06 +0100
commitb1bd589b2fc8075cab39679d23db2b7d285f8345 (patch)
tree933ce962203f846d6d53b53851b36949f921a869 /t/app/controller/report_updates.t
parentba9172907f5e41840cf5324cc335277bbd031ed2 (diff)
parent3423cfe5e16e9130a25238cd76de76ec2bf07c67 (diff)
Merge branch 'master' of ssh://git.mysociety.org/data/git/public/fixmystreet into open311-consumer
Conflicts: web/css/core.css web/js/fixmystreet.js
Diffstat (limited to 't/app/controller/report_updates.t')
-rw-r--r--t/app/controller/report_updates.t30
1 files changed, 11 insertions, 19 deletions
diff --git a/t/app/controller/report_updates.t b/t/app/controller/report_updates.t
index 993c6758e..4469d4003 100644
--- a/t/app/controller/report_updates.t
+++ b/t/app/controller/report_updates.t
@@ -413,19 +413,15 @@ subtest 'check non authority user cannot change set state' => sub {
$user->update;
$mech->get_ok("/report/$report_id");
- $mech->submit_form_ok( {
- form_number => 2,
- fields => {
+ $mech->post_ok( "/report/update", {
submit_update => 1,
id => $report_id,
name => $user->name,
- rznvy => $user->email,
may_show_name => 1,
- add_alert => 0,
+ add_alert => undef,
photo => '',
update => 'this is a forbidden update',
state => 'fixed - council',
- },
},
'submitted with state',
);
@@ -445,19 +441,15 @@ for my $state ( qw/unconfirmed hidden partial/ ) {
$user->update;
$mech->get_ok("/report/$report_id");
- $mech->submit_form_ok( {
- form_number => 2,
- fields => {
+ $mech->post_ok( "/report/update", {
submit_update => 1,
id => $report_id,
name => $user->name,
- rznvy => $user->email,
may_show_name => 1,
- add_alert => 0,
+ add_alert => undef,
photo => '',
update => 'this is a forbidden update',
state => $state,
- },
},
'submitted with state',
);
@@ -477,7 +469,7 @@ for my $test (
fields => {
name => $user->name,
may_show_name => 1,
- add_alert => 0,
+ add_alert => undef,
photo => '',
update => 'Set state to investigating',
state => 'investigating',
@@ -489,7 +481,7 @@ for my $test (
fields => {
name => $user->name,
may_show_name => 1,
- add_alert => 0,
+ add_alert => undef,
photo => '',
update => 'Set state to planned',
state => 'planned',
@@ -501,7 +493,7 @@ for my $test (
fields => {
name => $user->name,
may_show_name => 1,
- add_alert => 0,
+ add_alert => undef,
photo => '',
update => 'Set state to in progress',
state => 'in progress',
@@ -513,7 +505,7 @@ for my $test (
fields => {
name => $user->name,
may_show_name => 1,
- add_alert => 0,
+ add_alert => undef,
photo => '',
update => 'Set state to closed',
state => 'closed',
@@ -525,7 +517,7 @@ for my $test (
fields => {
name => $user->name,
may_show_name => 1,
- add_alert => 0,
+ add_alert => undef,
photo => '',
update => 'Set state to fixed',
state => 'fixed',
@@ -537,7 +529,7 @@ for my $test (
fields => {
name => $user->name,
may_show_name => 1,
- add_alert => 0,
+ add_alert => undef,
photo => '',
update => 'Set state to confirmed',
state => 'confirmed',
@@ -549,7 +541,7 @@ for my $test (
fields => {
name => $user->name,
may_show_name => 1,
- add_alert => 0,
+ add_alert => undef,
photo => '',
update => 'Set state to fixed',
state => 'fixed',