Closed
Description
[Test]
public void Post_ReturnsCorrectModel()
{
const string Slug = "abc";
repository
.Setup(repo => repo.Find(Slug))
.Returns(PostsMother.CreatePost(withSlug: Slug));
controller
.WithCallTo(c => c.Post(Slug))
.ShouldRenderDefaultView()
.WithModel<Post>(actual => actual.Slug == "something random");
}
The aforementioned code produces the following error message -
Expected view model to pass the given condition, but it failed.
In practice I found this error message to be completely unhelpful. Instead I suggest something along the lines of -
Expected "abc" but instead was "something random".
Metadata
Metadata
Assignees
Labels
No labels