How we can mock the authenticated user using Moq framework. Form Authentication used.
I need to write unit tests for the action below
public PartialViewResult MyGoals()
{
int userid = ((SocialGoalUser)(User.Identity)).UserId;
var Goals = goalService.GetMyGoals(userid);
return PartialView("_MyGoalsView", Goals);
}
I need to mock the value for userid here