public
Created

  • Download Gist
gistfile1.cs
C#
1 2 3 4 5 6 7 8 9 10
[Test]
public void When_requesting_the_admin_categories__add_post_page_result_is_correct()
{
var controller = new AdminController();
var viewModel = new CategoriesAddViewModel();
var result = controller.CategoriesAdd(viewModel);
result.Should().BeAssignableTo<RedirectResult>();
((RedirectToRouteResult)result).RouteValues["Action"].Should().Be("Categories");
((RedirectToRouteResult)result).RouteValues["Controller"].Should().Be("Admin");
}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.