diff --git a/tests/FunctionalTests/Web/WebTestFixture.cs b/tests/FunctionalTests/Web/WebTestFixture.cs index 55b2e74..d9bb491 100644 --- a/tests/FunctionalTests/Web/WebTestFixture.cs +++ b/tests/FunctionalTests/Web/WebTestFixture.cs @@ -23,6 +23,16 @@ public class TestApplication : WebApplicationFactory // Add mock/test services to the builder here builder.ConfigureServices(services => { + var descriptors = services.Where(d => + d.ServiceType == typeof(DbContextOptions) || + d.ServiceType == typeof(DbContextOptions)) + .ToList(); + + foreach (var descriptor in descriptors) + { + services.Remove(descriptor); + } + services.AddScoped(sp => { // Replace SQLite with in-memory database for tests