On Mon, 2008-01-21 at 14:19 -0700, Christopher Dorman wrote:
> I am using T::W::M::C to test a page that has a (required) Captcha 
> field.  In order for it to pass validation, the correct value needs to 
> be passed in.
> 
> Is it possible to grab the "correct" captcha value in the test script so 
> that validation can succeed, or do we need to set some environment 
> variable that we check in the validation to give the field a pass?  What 
> does everyone else do?

In your test file, you probably want to do something like:

  local *My::Captcha::Engine::_make_random_word = sub { "HELLO" }

Then your captcha will always be "HELLO".

Regards,
Jonathan Rockway

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/

Reply via email to