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

[eluser]_TubbZ_[/eluser]
Hello,

I am currently performing all my validation in the respective controllers which seems to be the CI standard using the Form_validation library. But from my interpretation of MVC is that the model should handle this and the controller should be just controlling the models (Fat Models, Skinny Controllers). The reason for asking is I am currently writing some unit tests to hammer my application and the testing library (TOAST and I tried a few others) cannot offer any tests on the controllers. So effectively my unit tests aren't that useful to test expected results. Although I can assume that the Form validation does what its supposed to do I really would prefer to test everything properly without any assumptions.

So should i move validation into the models? Or am i missing something here!

Thanks!!!


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