Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Test-WWW-Mechanize CPAN distribution.

Report information
The Basics
Id: 11629
Status: resolved
Priority: 0/
Queue: Test-WWW-Mechanize

People
Owner: Nobody in particular
Requestors: perrin [...] elem.com
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: test for basic page fetch
I'd like a method for testing basic fetching of a URL, like $mech->get_ok(). This is easy enough with ok(), but it feels odd to not have that. Ideally, it would also be great to allow checking for other status responses, like access denied or redirect.
From: Andy Lester <andy [...] petdance.com>
Subject: Re: [cpan #11629] test for basic page fetch
Date: Tue, 22 Feb 2005 20:41:42 -0600
To: bug-Test-WWW-Mechanize [...] rt.cpan.org
RT-Send-Cc:
Show quoted text
> I'd like a method for testing basic fetching of a URL, like > $mech->get_ok(). This is easy enough with ok(), but it feels odd to > not have that. Ideally, it would also be great to allow checking for > other status responses, like access denied or redirect.
So what would that call look like? $mech->get_ok( $url, "Got the home page" ); ? But what about the parms that I can pass to $mech->get()? For example, I can call $mech->get( $url, ":content_file"=>$tempfile ); How do I know if the parms are for get, or are a description of the test? I'd love this, too, but I don't have a clean way to do it yet. I welcome your ideas.
We now ahve get_ok.