mercatoid has asked for the wisdom of the Perl Monks concerning the following question:

I'm trying to test a catalyst application using Test::WWW::Mechanize::Catalyst

Let's say i'm trying to make a POST request to http://localhost/my/customers/212 - when I step into $c->request->arguments, it'll contain 3 strings: "my", "customers", and "212".

When I make the same POST request, except from the web rather than a test script, the $c->request->arguments will contain just the 1 string that I'm expecting, "212".

Basically, I'm getting different behavior on the same catalyst application between the web, and Test::WWW::Mechanize::Catalyst. Catalyst does not properly capture the route arguments when ran from a test. What can I do here?

Replies are listed 'Best First'.
Re: Catalyst Mechanize Mania
by kcott (Archbishop) on Dec 29, 2022 at 03:06 UTC

    G'day mercatoid,

    Welcome to the Monastery.

    Please provide some indication of your code (route arguments) and test script. Thankyou.

    — Ken