16 lines
453 B
Perl
16 lines
453 B
Perl
use Test::More;
|
|
use Mojo::File qw{curfile};
|
|
use Test::Mojo;
|
|
|
|
my $script = curfile->dirname->sibling('hr2.pl');
|
|
my $t = Test::Mojo->new($script);
|
|
my $example = 'H4sIAKeZJ2gAA8soKSmw0tdPrUjMLchJ1UvOzwUArN4B1xIAAAA%3D%0A';
|
|
|
|
$t->get_ok("/$example")->status_is(302)
|
|
->header_is(Location => 'http://example.com');
|
|
|
|
$t->get_ok("/--meta-refresh/$example")->status_is(200)
|
|
->attr_like(meta => content => qr/http:\/\/example\.com/);
|
|
|
|
done_testing;
|