public ActionResult Edit(UpdateSponsorInput sponsorInput, UserGroup userGroup) { sponsorInput.UserGroup = userGroup; return Command<UpdateSponsorInput, Sponsor>(sponsorInput, r => new RedirectToReturnUrlResult(), input => View(sponsorInput)); }
public void Should_save_a_new_sponsor_in_the_Save_action() { var userGroup = new UserGroup(); var input = new UpdateSponsorInput(); var controller = new SponsorController(null, PermisiveSecurityContext()); var result = (CommandResult) controller.Edit(input, null); result.Success.AssertResultIs<RedirectToReturnUrlResult>(); }