Topic: Fixtures "best practice"
I have a question about the use of fixtures. Unit and functional tests obviously need to ensure that bad data does not get into the database, by ensuring that the model (and view) refuses to allow it. I am wondering what peoples opinions are regarding the use of fixtures... Presumably they should only contain valid data, because they are going to be written directly to the database. If that is the case, then the convenience of using fixtures is lost when you want to test bad data, e.g. for testing validation - you'd have to code the bad data directly into your test methods.
I am thinking about creating two different test suites, each with their own set of fixtures - one for testing good data and the other bad. However, surely there's a potential problem with loading bad data into the database via fixtures, because there may be parts of the app that require good data to function properly. This looks like a maintenance nightmare.
Does anyone have any advice or pointers about the use of fixtures for testing functionality that requires bad data (e.g. validation)?