public async Task Handles_ValidGetRequest_DeleteFolderAsync() { SetUserInContext.SetContext("admin"); var result = await _folderController.DeleteFolderAsync(_model, CancellationToken.None); var redirectedRouteSlug = (result as RedirectToRouteResult).RouteValues["slug"]; var redirectedRouteTab = (result as RedirectToRouteResult).RouteValues["tab"]; Assert.IsInstanceOf <RedirectToRouteResult>(result); Assert.AreEqual(GroupSlugValid, redirectedRouteSlug); Assert.AreEqual(Constants.GroupFilesTab, redirectedRouteTab); }