[Catalyst] Testing OpenID Logins + more

fREW Schmidt frioux at gmail.com
Wed Sep 2 21:45:03 GMT 2009


On Wed, Sep 2, 2009 at 12:48 PM, Tomas Doran <bobtfish at bobtfish.net> wrote:

>
> On 1 Sep 2009, at 04:43, fREW Schmidt wrote:
>
>> I'd really like to start testing my controllers, and I wished I'd started
>> sooner, but oh well.  The biggest barrier at this point is the login sys=
tem.
>>  It uses OpenID for auth, which is where the hard stuff comes from.
>>
> <snip>
>
> Why bother with the complexity when testing if it isn't the OpenID stuff
> your testing specifically.
>
> I'd arrange for the relevant tests to supply a custom config file (I do
> this by mangling MYAPP_CONFIG env variable in the tests, although I'm sure
> there are more elegant solutions)..
>

Awesome!  This is one of the main things I wanted.  I'll let you know how it
works out.


> You can then change the authentication config to use different auth modul=
es
> (for example authenticating a hard-coded list of test users with known
> roles) for the purposes of testing your controllers.
>
> You still want to do _some_ testing of login / logout etc, but there is no
> point in jumping through hoops for _all_ of your controller testing.
>

Yeah, especially since it would mean my controller tests would have to load
of TWO catatlyst servers every time, which is just silly.


-- =

fREW Schmidt
http://blog.afoolishmanifesto.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20090902/56c4b=
1b0/attachment.htm


More information about the Catalyst mailing list