feat: enforce tenant isolation and shared question bank

This commit is contained in:
2026-07-27 16:59:12 +08:00
parent 28e9a9fa41
commit db4c7b4496
137 changed files with 6402 additions and 112274 deletions

View File

@@ -159,7 +159,7 @@ public sealed class PointsEndpointTests
Assert.Equal(30, summary.SpentPoints);
Assert.Equal(70, summary.BalancePoints);
using var scope = factory.Services.CreateScope();
using var scope = factory.CreateSystemScope();
var dbContext = scope.ServiceProvider.GetRequiredService<TikuDbContext>();
Assert.Contains(dbContext.Entitlements, item =>
item.TenantId == seed.TenantId &&
@@ -252,7 +252,7 @@ public sealed class PointsEndpointTests
"/api/auth/login/password",
new PasswordLoginDto
{
TenantId = seed.TenantId,
TenantCode = seed.TenantId.ToString("N"),
Phone = seed.Phone,
Password = "passw0rd!"
});