forked from gongxuegit/tiku-backend.net
feat: enforce tenant isolation and shared question bank
This commit is contained in:
@@ -141,7 +141,7 @@ public sealed class ContentManagementEndpointTests
|
||||
Assert.Equal(HttpStatusCode.OK, blueprintResponse.StatusCode);
|
||||
Assert.Equal(collectionId, blueprintJson.RootElement.GetProperty("item").GetProperty("collectionId").GetGuid());
|
||||
|
||||
using var scope = factory.Services.CreateScope();
|
||||
using var scope = factory.CreateSystemScope();
|
||||
var dbContext = scope.ServiceProvider.GetRequiredService<TikuDbContext>();
|
||||
Assert.Equal(1, dbContext.QuestionCollections.Single(item => item.Id == collectionId).QuestionCount);
|
||||
Assert.Contains(dbContext.QuestionCollectionItems, item => item.QuestionId == questionId);
|
||||
@@ -231,7 +231,7 @@ public sealed class ContentManagementEndpointTests
|
||||
"/api/auth/login/password",
|
||||
new PasswordLoginDto
|
||||
{
|
||||
TenantId = seed.TenantId,
|
||||
TenantCode = seed.TenantId.ToString("N"),
|
||||
Phone = seed.Phone,
|
||||
Password = "passw0rd!"
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user