[Catalyst] testing database contents

Alan Humphrey alan.humphrey at comcast.net
Fri Jul 14 18:53:56 CEST 2006


All -

 

This is another one of those "what is the best practice/how are other people
doing this" questions.

 

I'm testing a Catalyst app with Test::WWW::Mechanize::Catalyst.  Part of the
testing involves submitting data that goes into the database.  I'd like to
confirm that the data is actually in the database.  Some of the data can be
confirmed simply by testing another page in the app that should have the
data.   However, there is data that goes into the database that is never
shown to the user.  That data needs to be validated.

 

Options I see:

 

1)       Access the Model class(es) directly to get the data.

2)       Create a special testing controller/view that will display a dump
of the data.  T::W::M::C can load the url and check the dump.

 

What do you all think?  Is one approach better than the other?  Is there
another (better) way?

 

Thanks for your insights!

 

- Alan

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rawmode.org/pipermail/catalyst/attachments/20060714/9ed0ae89/attachment.htm 


More information about the Catalyst mailing list