| 1 |
use strict; |
| 2 |
use warnings; |
| 3 |
use Test::More tests => 2; |
| 4 |
use Plack::Test; |
| 5 |
use HTTP::Request::Common; |
| 6 |
|
| 7 |
{ |
| 8 |
package App; |
| 9 |
use Dancer2; |
| 10 |
set show_stacktrace => 1; |
| 11 |
} |
| 12 |
|
| 13 |
my $test = Plack::Test->create( App->to_app ); |
| 14 |
|
| 15 |
my $content = |
| 16 |
$test->request( GET '/nonexistent_path<strong>crazy</strong>' )->content; |
| 17 |
|
| 18 |
like $content, qr{/nonexistent_path<strong>crazy</strong>}, |
| 19 |
"Escaped message"; |
| 20 |
|
| 21 |
unlike $content, qr{/nonexistent_path<strong>crazy</strong>}, |
| 22 |
"No unescaped message"; |