aboutsummaryrefslogtreecommitdiffstats
path: root/t/app
diff options
context:
space:
mode:
Diffstat (limited to 't/app')
-rw-r--r--t/app/controller/report_new.t6
-rw-r--r--t/app/controller/report_updates.t9
2 files changed, 7 insertions, 8 deletions
diff --git a/t/app/controller/report_new.t b/t/app/controller/report_new.t
index 92bc54ba4..44e075f1e 100644
--- a/t/app/controller/report_new.t
+++ b/t/app/controller/report_new.t
@@ -728,10 +728,8 @@ subtest "test report creation for a user who is signing in as they report" => su
"submit good details"
);
- # check that we got the errors expected
- is_deeply $mech->page_errors, [
- 'You have successfully signed in; please check and confirm your details are accurate:',
- ], "check there were errors";
+ # check that we got the message expected
+ $mech->content_contains( 'You have successfully signed in; please check and confirm your details are accurate:' );
# Now submit with a name
$mech->submit_form_ok(
diff --git a/t/app/controller/report_updates.t b/t/app/controller/report_updates.t
index 17947a212..99c53ef01 100644
--- a/t/app/controller/report_updates.t
+++ b/t/app/controller/report_updates.t
@@ -932,9 +932,7 @@ for my $test (
add_alert => undef,
password_sign_in => 'secret2',
},
- field_errors => [
- 'You have successfully signed in; please check and confirm your details are accurate:',
- ],
+ message => 'You have successfully signed in; please check and confirm your details are accurate:',
}
) {
subtest $test->{desc} => sub {
@@ -955,7 +953,10 @@ for my $test (
'submit update'
);
- is_deeply $mech->page_errors, $test->{field_errors}, 'check there were errors';
+ $mech->content_contains($test->{message}) if $test->{message};
+
+ is_deeply $mech->page_errors, $test->{field_errors}, 'check there were errors'
+ if $test->{field_errors};
SKIP: {
skip( "Incorrect password", 5 ) unless $test->{form_values}{password_sign_in} eq $pw;