diff options
author | franck cuny <franck@lumberjaph.net> | 2009-06-25 15:33:29 +0200 |
---|---|---|
committer | franck cuny <franck@lumberjaph.net> | 2009-06-25 15:33:29 +0200 |
commit | 443918302b9a9fac6c853c77ce49182be38feb6f (patch) | |
tree | 24621eb0260fa9a2d250c9906933a28bc18d4cde /xt/tests/Test/MooseX | |
parent | POD (diff) | |
download | moosex-useragent-443918302b9a9fac6c853c77ce49182be38feb6f.tar.gz |
POD, add useragent string to async, tests
Diffstat (limited to 'xt/tests/Test/MooseX')
-rw-r--r-- | xt/tests/Test/MooseX/UserAgent.pm | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/xt/tests/Test/MooseX/UserAgent.pm b/xt/tests/Test/MooseX/UserAgent.pm index 3f9bdb8..db08c8d 100644 --- a/xt/tests/Test/MooseX/UserAgent.pm +++ b/xt/tests/Test/MooseX/UserAgent.pm @@ -17,7 +17,7 @@ use Cache::MemoryCache; is => 'rw', default => sub { return { - name => 'Mozilla/5.0 (compatible; RTGI; http://rtgi.fr/)', + name => 'Mozilla/5.0 (compatible; LWP; RTGI; http://rtgi.fr/)', mail => 'bot@rtgi.fr', timeout => 30, cache => { use_cache => 0, }, @@ -37,7 +37,7 @@ use Cache::MemoryCache; is => 'rw', default => sub { return { - name => 'Mozilla/5.0 (compatible; RTGI; http://rtgi.fr/)', + name => 'Mozilla/5.0 (compatible; Async; RTGI; http://rtgi.fr/)', mail => 'bot@rtgi.fr', timeout => 30, cache => { use_cache => 0, }, @@ -75,6 +75,7 @@ sub fetch : Tests(14) { # test with cache $obj = $ua->new( useragent_conf => { + name => 'Mozilla/5.0 (compatible; Async; RTGI; http://rtgi.fr/)', cache => { use_cache => 1, namespace => 'testua', @@ -91,19 +92,19 @@ sub fetch : Tests(14) { } } -sub get_content : Tests(8) { - my $test = shift; +#sub get_content : Tests(8) { + #my $test = shift; - foreach my $ua (@ua_roles) { - can_ok $ua, 'get_content'; + #foreach my $ua (@ua_roles) { + #can_ok $ua, 'get_content'; - ok my $obj = $ua->new(), ' ... object is created'; - my $url = 'http://google.com'; - my $res = $obj->fetch($url); - is $res->code, "200", "... fetch is a success"; - my $content = $obj->get_content($res); - like $content, qr/google/, "... and content is good"; - } -} + #ok my $obj = $ua->new(), ' ... object is created'; + #my $url = 'http://google.com'; + #my $res = $obj->fetch($url); + #is $res->code, "200", "... fetch is a success"; + #my $content = $obj->get_content($res); + #like $content, qr/google/, "... and content is good"; + #} +#} 1; |