I am learning MVC and I understand the basics now. It is very good for CRUD pages and has built in HTTP methods to post/get edits/updates. That is nice. This is all very testable by just creating a new controller and testing it.
But I was thinking about other web page scenerios when using MVC. What about a page that has 2 listboxes that you add/remove users with. (A button will move the user from one listbox to another)
This would be done using Jquery/Javascript… But then what happens to testing? How do you test adding/removing users from a listbox like that example?
It seems to me the more jquery you use the less testable the page becomes right? When you get beyond basic forms being filled out then you need to use something more than the standard MVC pages.
What is the correct philosophy on this on when am I not understanding ?
The right way to think about this scenario is to separate your application into two – one server MVC app and a client side jQuery app. The fact that the client-side code is generated and delivered by the server side app actions and views is irrelevant.
Once you start separating these two, you can start thinking about how to unit test each of them properly.