Skip to content

@wayne-o /gist:3983076
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
[Test]
public void When_requesting_the_admin_categories_add_post_page_result_is_correct()
{
var repository = new Mock<IRepository<Category>>();
repository.Setup(x=>x.Save(It.IsAny<Category>())).Verifiable();
var controller = new AdminController(repository.Object);
var viewModel = new CategoriesAddViewModel();
var result = controller.CategoriesAdd(viewModel);
result.Should().BeAssignableTo<RedirectToRouteResult>();
((RedirectToRouteResult)result).RouteValues["Action"].Should().Be("Categories");
((RedirectToRouteResult)result).RouteValues["Controller"].Should().Be("Admin");
repository.VerifyAll();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.