Skip to content

Commit

Permalink
(Possible) fix to the TinyURL test.
Browse files Browse the repository at this point in the history
  • Loading branch information
davorg committed May 6, 2014
1 parent 4857429 commit 8f93f85
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion t/tinyurl.t
Expand Up @@ -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',);

Expand Down

0 comments on commit 8f93f85

Please sign in to comment.