[Catalyst] Unit tests for controllers based on
jr at halo3.net
Wed Dec 29 04:19:08 GMT 2010
On Dec 28, 2010, at 11:06 PM, Peter Karman wrote:
> James Russo wrote on 12/28/10 6:47 PM:
>> Does anyone there some examples of unit tests for a controller which is based on Catalyst::Controller::REST? There was some discussion on the list a few years ago, and I think the conclusion was to use LWP directly and not Test::WWW::Mechanize::Catalyst. It seems that using the methods do not give you access to passing actual body content and content-type headers? There are getting overridden somewhere along the line. I'm going to continue to research it, but figured I'd ask here before I spend too much time on it.
Perfect. Thanks! As Matt just pointed out on IRC, perhaps wanting to use Mech for unit testing a REST controller is a bit misguided. Catalyst::Test should be fine.
More information about the Catalyst