Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

(Possible) fix to the TinyURL test.

  • Loading branch information...
commit 8f93f8595c6adc8531ee640212bf08b2928aca04 1 parent 4857429
@davorg authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 t/tinyurl.t
View
5 t/tinyurl.t
@@ -2,11 +2,14 @@ use Test::More tests => 6;
BEGIN { use_ok WWW::Shorten::TinyURL };
-my $url = 'http://search.cpan.org/dist/WWW-Shorten/';
+my $url = 'https://metacpan.org/release/WWW-Shorten';
my $return = makeashorterlink($url);
my ($code) = $return =~ /(\w+)$/;
my $prefix = 'http://tinyurl.com/';
is ( makeashorterlink($url), $prefix.$code, 'make it shorter');
+# Slight pause to increase the chance that all of TinyURL's servers
+# know about the new link
+sleep(5);
is ( makealongerlink($prefix.$code), $url, 'make it longer');
is ( makealongerlink($code), $url, 'make it longer by Id',);
Please sign in to comment.
Something went wrong with that request. Please try again.