Skip to content

Commit

Permalink
fix: Dispose factory inside test
Browse files Browse the repository at this point in the history
  • Loading branch information
linkdotnet committed Sep 6, 2024
1 parent da22515 commit 90eef14
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/LinkDotNet.Blog.IntegrationTests/SmokeTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,12 @@ public async Task ShouldBootUpApplication()
[Fact]
public async Task ShouldBootUpWithSqlDatabase()
{
using var client = factory.WithWebHostBuilder(builder =>
await using var sqlFactory = factory.WithWebHostBuilder(builder =>
{
builder.UseSetting("PersistenceProvider", PersistenceProvider.Sqlite.Key);
builder.UseSetting("ConnectionString", "DataSource=file::memory:?cache=shared");
}).CreateClient();
});
using var client = sqlFactory.CreateClient();

var result = await client.GetAsync("/");

Expand Down

0 comments on commit 90eef14

Please sign in to comment.