Skip to content

Commit

Permalink
better log messages
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Jan 27, 2015
1 parent 6ca4ba7 commit 107872c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/Mojolicious/Controller.pm
Expand Up @@ -99,10 +99,10 @@ sub every_signed_cookie {
}
if ($valid) { push @results, $value }

else { $self->app->log->debug(qq{Cookie "$name" has bad signature}) }
else { $self->app->log->debug(qq{Cookie "$name" has a bad signature}) }
}

else { $self->app->log->debug(qq{Cookie "$name" not signed}) }
else { $self->app->log->debug(qq{Cookie "$name" is not signed}) }
}

return \@results;
Expand Down
4 changes: 2 additions & 2 deletions t/mojolicious/group_lite_app.t
Expand Up @@ -271,8 +271,8 @@ $cb = $t->app->log->on(message => sub { $log .= pop });
$t->get_ok('/bridge2stash')->status_is(200)
->content_is(
"stash too!cookie!!signed_cookie!!bad_cookie--12345678!session!flash!\n");
like $log, qr/Cookie "foo" not signed/, 'right message';
like $log, qr/Cookie "bad" has bad signature/, 'right message';
like $log, qr/Cookie "foo" is not signed/, 'right message';
like $log, qr/Cookie "bad" has a bad signature/, 'right message';
ok $t->tx->res->cookie('mojolicious')->httponly,
'session cookie has HttpOnly flag';
$t->app->log->unsubscribe(message => $cb);
Expand Down

0 comments on commit 107872c

Please sign in to comment.