aboutsummaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2013-03-14 10:37:41 +0000
committerMatthew Somerville <matthew@mysociety.org>2013-03-14 10:37:41 +0000
commit85ed45239a70f41afc8446cfc0f53acaffdeee3f (patch)
tree0a30d8db5d46628d37e3728eea15394245592c52 /t
parent1d2bf7c4c9d00ac25b715a3797c9a7f5bd9c170c (diff)
parente7036ce558eebb9bde980aa1206cb4d67683ae3d (diff)
Merge branch 'zurich'
Conflicts: locale/FixMyStreet.po locale/cy_GB.UTF-8/LC_MESSAGES/EmptyHomes.po locale/de_CH.UTF-8/LC_MESSAGES/FixMyStreet.po locale/nb_NO.UTF-8/LC_MESSAGES/FixMyStreet.po locale/nn_NO.UTF-8/LC_MESSAGES/FixMyStreet.po
Diffstat (limited to 't')
-rw-r--r--t/app/controller/auth.t2
-rw-r--r--t/cobrand/zurich.t27
2 files changed, 28 insertions, 1 deletions
diff --git a/t/app/controller/auth.t b/t/app/controller/auth.t
index 67466e959..8d7bfbf4d 100644
--- a/t/app/controller/auth.t
+++ b/t/app/controller/auth.t
@@ -95,7 +95,7 @@ $mech->not_logged_in_ok;
$mech->log_out_ok;
$mech->get_ok($link);
is $mech->uri, $link, "not logged in";
- $mech->content_contains( 'Link too old or already used',
+ $mech->content_contains( 'too old or already used',
'token now invalid' );
$mech->not_logged_in_ok;
}
diff --git a/t/cobrand/zurich.t b/t/cobrand/zurich.t
index 71c904ed9..ac0cc52b3 100644
--- a/t/cobrand/zurich.t
+++ b/t/cobrand/zurich.t
@@ -19,6 +19,8 @@ $mech->content_like( qr/zurich/i );
# Set up bodies
my $zurich = $mech->create_body_ok( 1, 'Zurich' );
+$zurich->parent( undef );
+$zurich->update;
my $division = $mech->create_body_ok( 2, 'Division 1' );
$division->parent( $zurich->id );
$division->send_method( 'Zurich' );
@@ -169,6 +171,31 @@ like $email->header('From'), qr/division\@example.org/, 'from line looks correct
like $email->body, qr/FINAL UPDATE/, 'body looks correct';
$mech->clear_emails_ok;
+# Assign directly to planned, don't confirm email
+@reports = $mech->create_problems_for_body( 1, 2, 'Second', {
+ state => 'unconfirmed',
+ confirmed => undef,
+ cobrand => 'zurich',
+});
+$report = $reports[0];
+
+$mech->get_ok( '/admin/report_edit/' . $report->id );
+$mech->submit_form_ok( { with_fields => { state => 'planned' } } );
+$mech->get_ok( '/report/' . $report->id );
+$mech->content_contains('In Bearbeitung');
+$mech->content_contains('Second Test');
+
+$mech->get_ok( '/admin/report_edit/' . $report->id );
+$mech->content_contains( 'Unbest&auml;tigt' );
+$mech->submit_form_ok( { button => 'publish_response', with_fields => { status_update => 'FINAL UPDATE' } } );
+
+$mech->get_ok( '/report/' . $report->id );
+$mech->content_contains('Erledigt');
+$mech->content_contains('Second Test');
+$mech->content_contains('FINAL UPDATE');
+
+$mech->email_count_is(0);
+
# Report assigned to third party
@reports = $mech->create_problems_for_body( 1, 2, 'Third', {