diff --git a/Changes b/Changes index 6b7406f2..c66091d4 100644 --- a/Changes +++ b/Changes @@ -1,10 +1,11 @@ Revision history for WWW::Mechanize {{$NEXT}} + [TESTS] + - Add a test for finding a link in a meta refresh tag 1.91 2019-01-10 18:44:33Z [ENHANCEMENTS] - - Don't install Perl::Critic and Perl::Tidy to run user tests (GH#268) (Julien Fiegehenn) - Remove redundant PodSyntaxTests (GH#265) (Andrew Grangaard) diff --git a/t/find_link.t b/t/find_link.t index 0ea88bb7..09a1944f 100644 --- a/t/find_link.t +++ b/t/find_link.t @@ -2,7 +2,8 @@ use warnings; use strict; -use Test::More tests => 65; + +use Test::More; use URI::file; BEGIN { @@ -154,3 +155,9 @@ $x = $mech->find_link( text_regex => qr/click/i); isa_ok( $x, 'WWW::Mechanize::Link' ); is( $x->[0], 'http://www.yahoo.com/', 'Got js url link' ); is( $x->url, 'http://www.yahoo.com/', 'Got js url link' ); + +$mech->get( URI::file->new_abs('t/refresh.html') ); +my $link = $mech->find_link( tag => 'meta' ); +is( $link->url, 'http://www.mysite.com/', 'got link from meta tag via tag search' ); + +done_testing(); diff --git a/t/refresh.html b/t/refresh.html new file mode 100644 index 00000000..cae0839b --- /dev/null +++ b/t/refresh.html @@ -0,0 +1,3 @@ + + +