diff --git a/CleanArchitecture.IntegrationTests/Fixtures/TenantTestFixture.cs b/CleanArchitecture.IntegrationTests/Fixtures/TenantTestFixture.cs index 7416837..f56bf75 100644 --- a/CleanArchitecture.IntegrationTests/Fixtures/TenantTestFixture.cs +++ b/CleanArchitecture.IntegrationTests/Fixtures/TenantTestFixture.cs @@ -21,6 +21,13 @@ public async Task SeedTestData() CreatedTenantId, "Test Tenant")); + // This tenant should not be included in any queries + var deletedTenant = new Tenant( + CreatedTenantId, + "Test Tenant2"); + deletedTenant.Delete(); + context.Tenants.Add(deletedTenant); + context.Users.Add(new User( Guid.NewGuid(), CreatedTenantId, diff --git a/CleanArchitecture.IntegrationTests/Fixtures/UserTestFixture.cs b/CleanArchitecture.IntegrationTests/Fixtures/UserTestFixture.cs index bb07bec..05fd349 100644 --- a/CleanArchitecture.IntegrationTests/Fixtures/UserTestFixture.cs +++ b/CleanArchitecture.IntegrationTests/Fixtures/UserTestFixture.cs @@ -1,4 +1,5 @@ -using System.Threading.Tasks; +using System; +using System.Threading.Tasks; using CleanArchitecture.Domain.Constants; using CleanArchitecture.Domain.Entities; using CleanArchitecture.Domain.Enums; @@ -29,6 +30,18 @@ public async Task SeedTestData() "$2a$12$Blal/uiFIJdYsCLTMUik/egLbfg3XhbnxBC6Sb5IKz2ZYhiU/MzL2", UserRole.Admin)); + // This user should not be included in any queries + var deletedUsed = new User( + Guid.NewGuid(), + Ids.Seed.TenantId, + "admin2@email.com", + "Admin2", + "User2", + "$2a$12$Blal/uiFIJdYsCLTMUik/egLbfg3XhbnxBC6Sb5IKz2ZYhiU/MzL2", + UserRole.User); + deletedUsed.Delete(); + context.Users.Add(deletedUsed); + context.Users.Add(new User( TestAuthenticationOptions.TestUserId, Ids.Seed.TenantId,