mirror of
https://github.com/alex289/CleanArchitecture.git
synced 2025-07-11 16:15:05 +00:00
fix: Integration test duplicated seedings
This commit is contained in:
parent
85f6a28777
commit
f5dbecda7b
@ -16,19 +16,6 @@ public sealed class UserTestFixture : TestFixtureBase
|
|||||||
|
|
||||||
using var context = Factory.Services.GetRequiredService<ApplicationDbContext>();
|
using var context = Factory.Services.GetRequiredService<ApplicationDbContext>();
|
||||||
|
|
||||||
context.Tenants.Add(new Tenant(
|
|
||||||
Ids.Seed.TenantId,
|
|
||||||
"Admin Tenant"));
|
|
||||||
|
|
||||||
context.Users.Add(new User(
|
|
||||||
Ids.Seed.UserId,
|
|
||||||
Ids.Seed.TenantId,
|
|
||||||
"admin@email.com",
|
|
||||||
"Admin",
|
|
||||||
"User",
|
|
||||||
"$2a$12$Blal/uiFIJdYsCLTMUik/egLbfg3XhbnxBC6Sb5IKz2ZYhiU/MzL2",
|
|
||||||
UserRole.Admin));
|
|
||||||
|
|
||||||
context.Users.Add(new User(
|
context.Users.Add(new User(
|
||||||
TestAuthenticationOptions.TestUserId,
|
TestAuthenticationOptions.TestUserId,
|
||||||
Ids.Seed.TenantId,
|
Ids.Seed.TenantId,
|
||||||
|
@ -28,10 +28,6 @@ public sealed class GetUsersByIdsTestFixture : TestFixtureBase
|
|||||||
|
|
||||||
using var context = Factory.Services.GetRequiredService<ApplicationDbContext>();
|
using var context = Factory.Services.GetRequiredService<ApplicationDbContext>();
|
||||||
|
|
||||||
context.Tenants.Add(new Tenant(
|
|
||||||
Ids.Seed.TenantId,
|
|
||||||
"Admin Tenant"));
|
|
||||||
|
|
||||||
var user = CreateUser();
|
var user = CreateUser();
|
||||||
|
|
||||||
context.Users.Add(user);
|
context.Users.Add(user);
|
||||||
|
Loading…
Reference in New Issue
Block a user