aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller/report_updates.t
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2014-11-18 17:05:39 +0000
committerMatthew Somerville <matthew@mysociety.org>2014-11-18 17:25:53 +0000
commite039f86ec38a36486f6bb61c332192d9dc71acdb (patch)
tree8d1458eb30bd5dab870e08ea6c6f67255cdff407 /t/app/controller/report_updates.t
parent57fcd59af03f823528f71c03c8f8043f4fee63ca (diff)
Show logged in message as success, not error.
Fixes #357. Also consolidate almost-identical fill_in_details.html template (for #344).
Diffstat (limited to 't/app/controller/report_updates.t')
-rw-r--r--t/app/controller/report_updates.t9
1 files changed, 5 insertions, 4 deletions
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;