[HttpPost]
  [AllowAnonymous]
  [ValidateAntiForgeryToken]
  public ActionResult Login(LoginModel model, string returnUrl)

     if (ModelState.IsValid && WebSecurity.Login(model.UserName, model.PasswordpersistCookie: model.RememberMe))
     {
        return RedirectToLocal(returnUrl);
     }
     ModelState.AddModelError("", "The user name or password provided is incorrect.");
     return View(model);
  }

Can I get to know a good source for unit testing this. I am new to unit testing.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.