Filters (like your authorizeattribute) are designed to be independent of controllers and action methods. when you write unit tests for your action methods, filters are simply ignored, they are just attributes. But you do not need to test them when you test your controllers and actions! If you want to test how your application works all together, you should write ui automation tests.
Update: Stephen Sanderson perfectly explains this in his book pro asp.net mvc 2 framework. In fact, I repeated his words above
source share