Welcome Guest, Not a member yet? Register   Sign In
Implementing Validation and Unit Testing Question
#2

[eluser]jalalski[/eluser]
I think it is two different things. Form validation is there to provide fast feedback to users that their input is not complete and for testing this I use Selenium test cases.
Unit tests, in my view, are for testing the backend of the site without concern of the graphical front end.
I tend more to Skinny Models, Fat Controllers and so form validation naturally belongs in the controller. If you think of the form validation stuff as being more of a View thing, then I don't see any reason for it to be in the Model.


Messages In This Thread
Implementing Validation and Unit Testing Question - by El Forum - 11-04-2010, 08:50 AM
Implementing Validation and Unit Testing Question - by El Forum - 11-04-2010, 09:18 AM
Implementing Validation and Unit Testing Question - by El Forum - 11-04-2010, 09:24 AM



Theme © iAndrew 2016 - Forum software by © MyBB