diff options
author | Matthew Somerville <matthew@mysociety.org> | 2012-03-02 01:05:00 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2012-03-02 01:05:00 +0000 |
commit | 55409fb82ab2d75216255f77938632cb54d47fef (patch) | |
tree | d649b234d9fb9b8ef32a7ba85ca7192dbaf30670 /t/app/controller | |
parent | 7b373378a67a760e5486393c031cb1d9ac265df1 (diff) |
Get test suite all passing again, and fix bug displaying partial photo and my stupid use of c as a variable.
Diffstat (limited to 't/app/controller')
-rw-r--r-- | t/app/controller/admin.t | 2 | ||||
-rw-r--r-- | t/app/controller/report_new.t | 12 | ||||
-rw-r--r-- | t/app/controller/report_updates.t | 8 |
3 files changed, 12 insertions, 10 deletions
diff --git a/t/app/controller/admin.t b/t/app/controller/admin.t index 0a6f09585..d8a1c24a1 100644 --- a/t/app/controller/admin.t +++ b/t/app/controller/admin.t @@ -79,6 +79,8 @@ my $alert = FixMyStreet::App->model('DB::Alert')->find_or_create( subtest 'check summary counts' => sub { my $problems = FixMyStreet::App->model('DB::Problem')->search( { state => { -in => [qw/confirmed fixed closed investigating planned/, 'in progress', 'fixed - user', 'fixed - council'] } } ); + ok $mech->host('www.fixmystreet.com'); + my $problem_count = $problems->count; $problems->update( { cobrand => '' } ); diff --git a/t/app/controller/report_new.t b/t/app/controller/report_new.t index 076813868..6da9afa24 100644 --- a/t/app/controller/report_new.t +++ b/t/app/controller/report_new.t @@ -191,7 +191,7 @@ foreach my $test ( changes => {}, errors => [ 'Please enter your email', -'Please enter your full name, councils need this information - if you do not wish your name to be shown on the site, untick the box', +'Please enter your full name, councils need this information – if you do not wish your name to be shown on the site, untick the box below', ], }, { @@ -213,7 +213,7 @@ foreach my $test ( changes => {}, errors => [ 'Please enter your email', -'Please enter your full name, councils need this information - if you do not wish your name to be shown on the site, untick the box', +'Please enter your full name, councils need this information – if you do not wish your name to be shown on the site, untick the box below', ], }, { @@ -360,7 +360,7 @@ foreach my $test ( "submit location" ); # click through to the report page - $mech->follow_link_ok( { text => 'skip this step', }, + $mech->follow_link_ok( { text_regex => qr/skip this step/i, }, "follow 'skip this step' link" ); $mech->submit_form_ok( @@ -473,7 +473,7 @@ subtest "test password errors for a user who is signing in as they report" => su "submit location" ); # click through to the report page - $mech->follow_link_ok( { text => 'skip this step', }, + $mech->follow_link_ok( { text => 'Skip this step', }, "follow 'skip this step' link" ); $mech->submit_form_ok( @@ -520,7 +520,7 @@ subtest "test report creation for a user who is signing in as they report" => su "submit location" ); # click through to the report page - $mech->follow_link_ok( { text => 'skip this step', }, + $mech->follow_link_ok( { text => 'Skip this step', }, "follow 'skip this step' link" ); $mech->submit_form_ok( @@ -614,7 +614,7 @@ foreach my $test ( "submit location" ); # click through to the report page - $mech->follow_link_ok( { text => 'skip this step', }, + $mech->follow_link_ok( { text => 'Skip this step', }, "follow 'skip this step' link" ); # check that the fields are correctly prefilled diff --git a/t/app/controller/report_updates.t b/t/app/controller/report_updates.t index 39cb5d6d8..99f1ba62d 100644 --- a/t/app/controller/report_updates.t +++ b/t/app/controller/report_updates.t @@ -826,7 +826,7 @@ for my $test ( update => 'Update from a registered user' }, initial_banner => undef, - endstate_banner => ' This problem has been fixed. ', + endstate_banner => 'Fixed', alert => 1, anonymous => 0, }, @@ -848,8 +848,8 @@ for my $test ( changed => { update => 'Another update from a registered user' }, - initial_banner => ' This problem has been fixed. ', - endstate_banner => ' This problem has been fixed. ', + initial_banner => 'Fixed', + endstate_banner => 'Fixed', alert => 0, anonymous => 0, }, @@ -953,7 +953,7 @@ foreach my $test ( fixed => 1, }, changed => { update => 'Update from owner' }, - initial_banner => ' This problem is in progress. ', + initial_banner => 'In progress', initial_state => 'in progress', alert => 1, # we signed up for alerts before, do not unsign us anonymous => 0, |