aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perllib/FixMyStreet/App/Controller/Auth.pm5
-rw-r--r--t/cobrand/zurich.t6
2 files changed, 7 insertions, 4 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Auth.pm b/perllib/FixMyStreet/App/Controller/Auth.pm
index aae912ad1..57b53a155 100644
--- a/perllib/FixMyStreet/App/Controller/Auth.pm
+++ b/perllib/FixMyStreet/App/Controller/Auth.pm
@@ -182,7 +182,10 @@ Used after signing in to take the person back to where they were.
sub redirect_on_signin : Private {
my ( $self, $c, $redirect ) = @_;
$redirect = 'my' unless $redirect;
- $redirect = 'admin' if $c->cobrand->moniker eq 'zurich' && $c->user->from_body;
+ if ( $c->cobrand->moniker eq 'zurich' ) {
+ $redirect = 'my' if $redirect eq 'admin';
+ $redirect = 'admin' if $c->user->from_body;
+ }
$c->res->redirect( $c->uri_for( "/$redirect" ) );
}
diff --git a/t/cobrand/zurich.t b/t/cobrand/zurich.t
index f354f0da4..f64eec2a3 100644
--- a/t/cobrand/zurich.t
+++ b/t/cobrand/zurich.t
@@ -49,7 +49,7 @@ my $user = $mech->log_in_ok( 'dm1@example.org') ;
$user->from_body( undef );
$user->update;
$mech->get_ok( '/admin' );
-is $mech->uri->path, '/auth', "got sent to the sign in page";
+is $mech->uri->path, '/my', "got sent to /my";
$user->from_body( 2 );
$user->update;
@@ -82,7 +82,7 @@ $mech->content_contains( 'Some internal notes' );
# Original description
$mech->submit_form_ok( { with_fields => { detail => 'Edited details text.' } } );
$mech->content_contains( 'Edited details text.' );
-$mech->content_contains( 'originally entered: “Test Test 1 for 2 Detail”' );
+$mech->content_contains( 'Originaltext: “Test Test 1 for 2 Detail”' );
$mech->get_ok( '/admin/report_edit/' . $report->id );
$mech->submit_form_ok( { with_fields => { body_subdivision => 3 } } );
@@ -101,7 +101,7 @@ $mech->log_out_ok;
$user = $mech->log_in_ok( 'sdm1@example.org') ;
$mech->get_ok( '/admin' );
-is $mech->uri->path, '/auth', "got sent to the sign in page";
+is $mech->uri->path, '/my', "got sent to /my";
$user->from_body( 3 );
$user->update;