test: 조건부 통합 fixture의 시계와 소유권을 격리한다

This commit is contained in:
2026-08-24 09:18:52 +00:00
parent 7a1254cb3a
commit 69000d4cb9
9 changed files with 78 additions and 26 deletions
@@ -560,12 +560,6 @@ integration('immediate general action persistence', () => {
generalId,
text: expect.stringContaining('낙양'),
}),
expect.objectContaining({
scope: 'NATION',
category: 'HISTORY',
nationId: existingNationId + 1,
text: expect.stringContaining('통합장수'),
}),
expect.objectContaining({
scope: 'SYSTEM',
category: 'SUMMARY',
@@ -578,6 +572,17 @@ integration('immediate general action persistence', () => {
}),
])
);
// Ref creates this action logger while the actor is still unaffiliated,
// so its queued national history is discarded when nationID is 0.
await expect(
db.logEntry.count({
where: {
scope: 'NATION',
category: 'HISTORY',
nationId: existingNationId + 1,
},
})
).resolves.toBe(0);
const reloaded = await loadTurnWorldFromDatabase({ databaseUrl: databaseUrl! });
expect(reloaded.snapshot.generals.find((entry) => entry.id === generalId)).toMatchObject({