small medium large xlarge

Generic-user-small
17 Sep 2010, 23:42
Suraj K. Gupta (1 post)

In 7.2 we added validation for unique Title and saw that the test “product is not valid without a unique title” produces an error when we try to create a new product with the same title as :ruby

For that to be the case, the fixture record for :ruby had to be loaded in the database, correct? What happened with one: and two: given that they both have the title “MyString”. Were they not validated? Are they simply inserted into the products table?

Samr_small_pragsmall
18 Sep 2010, 00:22
Sam Ruby (634 posts)

You are correct - fixtures are loaded directly into the database without invoking validation. I should add a note into the book to this effect.

You must be logged in to comment