Use simpler URL HTTPMicro vs. HTTP::Tiny comparison.

This commit is contained in:
Daniel Nichter
2012-08-22 16:27:52 -06:00
parent 639f47eb70
commit 154303bb89

View File

@@ -16,17 +16,19 @@ use HTTPMicro;
local $EVAL_ERROR; local $EVAL_ERROR;
eval { require HTTP::Tiny }; eval { require HTTP::Tiny };
if ( $EVAL_ERROR ) { if ( $EVAL_ERROR ) {
plan skip_all => "HTTP::Tiny is not installed, not testing compat"; plan skip_all => "HTTP::Tiny is not installed";
} }
my $test_url = "http://www.google.com"; # Need a simple URL that won't try to do chunking.
my $test_url = "http://www.percona.com/robots.txt";
my $tiny = HTTP::Tiny->new(max_redirect => 0)->request('GET', $test_url); my $tiny = HTTP::Tiny->new(max_redirect => 0)->request('GET', $test_url);
my $micro = HTTPMicro->new->request('GET', $test_url); my $micro = HTTPMicro->new->request('GET', $test_url);
is_deeply( is_deeply(
$micro->{content}, $micro->{content},
$tiny->{content}, $tiny->{content},
"HTTPMicro behaves like HTTP::Tiny (with max_redirect) for $test_url" "HTTPMicro behaves like HTTP::Tiny (max_redirect=0)"
); );
done_testing; done_testing;
exit;