aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Tokens.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Tokens.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/Tokens.pm25
1 files changed, 25 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Tokens.pm b/perllib/FixMyStreet/App/Controller/Tokens.pm
index 00ac63599..c8a7531d6 100644
--- a/perllib/FixMyStreet/App/Controller/Tokens.pm
+++ b/perllib/FixMyStreet/App/Controller/Tokens.pm
@@ -28,6 +28,16 @@ problem but are not logged in.
sub confirm_problem : Path('/P') {
my ( $self, $c, $token_code ) = @_;
+ if ($token_code eq '_test_') {
+ $c->stash->{report} = {
+ id => 123,
+ title => 'Title of Report',
+ bodies_str => 'True',
+ url => '/report/123',
+ };
+ return;
+ }
+
my $auth_token =
$c->forward( 'load_auth_token', [ $token_code, 'problem' ] );
@@ -134,6 +144,11 @@ alert but are not logged in.
sub confirm_alert : Path('/A') {
my ( $self, $c, $token_code ) = @_;
+ if ($token_code eq '_test_') {
+ $c->stash->{confirm_type} = $c->req->params->{confirm_type};
+ return;
+ }
+
my $auth_token = $c->forward( 'load_auth_token', [ $token_code, 'alert' ] );
# Load the problem
@@ -169,6 +184,16 @@ update but are not logged in.
sub confirm_update : Path('/C') {
my ( $self, $c, $token_code ) = @_;
+ if ($token_code eq '_test_') {
+ $c->stash->{problem} = {
+ id => 123,
+ title => 'Title of Report',
+ bodies_str => 'True',
+ url => '/report/123',
+ };
+ return;
+ }
+
my $auth_token =
$c->forward( 'load_auth_token', [ $token_code, 'comment' ] );