moq
Mocking a ControllerContext with authenticated user with Moq for ASP.NET MVC (3)
Whenever you are writing unit tests or BDD-style specs for your ASP.NET MVC controllers (you are, right?) there will come a moment when you actually need to simulate that a user is authenticated to your site. Even if you’re familiar with mocking, letting the controller think someone has logged in t ...
