Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save ntakouris/750acf052475682a65d5e2b5cce8291a to your computer and use it in GitHub Desktop.

Select an option

Save ntakouris/750acf052475682a65d5e2b5cce8291a to your computer and use it in GitHub Desktop.
[Fact]
public async Task GetAll_WithoutAnyPosts_ReturnsEmptyResponse()
{
// Arrange
await AuthenticateAsync();
// Act
var response = await TestClient.GetAsync(ApiRoutes.Posts.GetAll);
// Assert
response.StatusCode.Should().Be(HttpStatusCode.OK);
(await response.Content.ReadAsAsync<List<Post>>()).Should().BeEmpty();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment