Google-Chart
view release on metacpan or search on metacpan
t/90_env_proxy.t view on Meta::CPAN
use Test::More (tests => 4);
BEGIN {
use_ok("Google::Chart");
}
note "LWP::UserAgent: $LWP::UserAgent::VERSION\n";
{
# self note: LWP::UserAgent 5.819 allowed $ENV{HTTP_PROXY} = '',
# but I got a failure report for LWP::UserAgent 5.821
local %ENV;
delete $ENV{HTTP_PROXY};
my $g = Google::Chart->new(type => 'Line');
ok(! $g->ua->proxy('http'), "http proxy should not be set");
}
{
local $ENV{HTTP_PROXY} = 'http://localhost:3128';
my $g = Google::Chart->new(type => 'Line');
is($g->ua->proxy('http'), $ENV{HTTP_PROXY}, "http proxy should be set");
}
{
local $ENV{HTTP_PROXY} = 'http://localhost:3128';
local $ENV{GOOGLE_CHART_ENV_PROXY} = 0;
my $g = Google::Chart->new(type => 'Line');
ok(! $g->ua->proxy('http'), "http proxy should not be set");
}
( run in 0.391 second using v1.01-cache-2.11-cpan-483215c6ad5 )