Skip to content

Commit 06c9bfe

Browse files
test: fix get posts conflicting
Xunit v3 isn't running tests in order, where we were previously assuming tests would run in the order they're defined, and it's easier to just narrow the get-all endpoint test to use a querystring search instead of tackling test order issues.
1 parent 40a3725 commit 06c9bfe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/BHS.Api.IntegrationTests/EndpointTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public async Task Banners_GetCurrent()
8383
[Fact]
8484
public async Task Blog_GetPosts()
8585
{
86-
var posts = await _httpClient.GetFromJsonAsync<IEnumerable<PostPreview>>("/api/blog/posts", TestContext.Current.CancellationToken);
86+
var posts = await _httpClient.GetFromJsonAsync<IEnumerable<PostPreview>>($"/api/blog/posts?q={Random.Shared.Next()}", TestContext.Current.CancellationToken);
8787

8888
Assert.NotNull(posts);
8989
Assert.Empty(posts);

0 commit comments

Comments
 (0)