public void LogOn_Post_ReturnsRedirectOnSuccess_WithReturnUrl()
{
// Arrange
AccountController controller = GetAccountController();
LogOnModel model = new LogOnModel()
{
UserName = "someUser",
Password = "goodPassword",
RememberMe = false
};
// Act
ActionResult result = controller.LogOn(model, "/someUrl");
// Assert
Assert.IsInstanceOfType(result, typeof(RedirectResult));
RedirectResult redirectResult = (RedirectResult)result;
Assert.AreEqual("/someUrl", redirectResult.Url);
Assert.IsTrue(((MockFormsAuthenticationService)controller.FormsService).SignIn_WasCalled);
}