-Config.Temp
All checks were successful
Dotnet build and test / build (pull_request) Successful in 12m53s

This commit is contained in:
Paul Schneider 2026-09-18 11:13:44 +01:00
commit eebd46176d
Signed by: notazof
GPG key ID: 1DD5D838E5343B06
6 changed files with 38 additions and 356 deletions

View file

@ -364,6 +364,9 @@ public sealed class BlogApiTests : IClassFixture<BlogsWebServerFixture>
var created = (await postResponse.Content.ReadFromJsonAsync<BlogPost>(
TestContext.Current.CancellationToken))!;
var attachmentCount = CountAttachmentsForPost(created.Id);
Assert.True(attachmentCount == 0);
var update = new BlogPost
{
Id = created.Id,
@ -402,8 +405,8 @@ public sealed class BlogApiTests : IClassFixture<BlogsWebServerFixture>
using var detailsDoc = JsonDocument.Parse(
await detailsResponse.Content.ReadAsStringAsync(TestContext.Current.CancellationToken));
Assert.Equal("Mis a jour via multipart", detailsDoc.RootElement.GetProperty("title").GetString());
Assert.True(CountAttachmentsForPost(created.Id) >= 1);
attachmentCount = CountAttachmentsForPost(created.Id);
Assert.True(attachmentCount >= 1);
}
finally
{

View file

@ -71,7 +71,7 @@ public sealed class BlogsWebServerFixture : WebHostFixture
/// A fresh per-run temp directory, so tests can assert on the
/// physical file without touching the developer's real
/// user-files tree.</summary>
public string BlogFilesRoot { get; private set; } = string.Empty;
public string BlogFilesRoot { get; private set; } = "files-root";
// A single SqliteConnection held open at the static level,
// mirroring how Yavsc.Org.Tests.WebServerFixture hoists its