public async Task <ActionResult> NilReturnConfirm(SubmittedReturnViewModel viewModel) { using (var client = apiClient()) { await client.SendAsync(User.GetAccessToken(), new SubmitReturn(viewModel.ReturnId, true)); return(AeRedirect.Confirmation(viewModel.ReturnId)); } }
public void ConfirmationRedirectCalled_ShouldReturnCorrectRoute() { var returnId = Guid.NewGuid(); var newRoute = AeRedirect.Confirmation(returnId); Assert.Equal(AeRedirect.ReturnsRouteName, newRoute.RouteName); Assert.Equal("Returns", newRoute.RouteValues["controller"]); Assert.Equal("Confirmation", newRoute.RouteValues["action"]); Assert.Equal(returnId, newRoute.RouteValues["returnId"]); }