fix: removed unneeded linkage for media from photo album pages

This commit is contained in:
2026-02-16 06:03:56 +01:00
parent 60a291bedb
commit 52aed4c420
4 changed files with 33 additions and 114 deletions

View File

@@ -261,6 +261,20 @@ describe('photo_archive hydration', () => {
expect(monthKeys[0]).toBe('2020-06');
expect(monthKeys[monthKeys.length - 1]).toBe('2019-09');
});
it('should not require post-media linking side effects during preview hydration', async () => {
const linkMany = vi.fn();
const unlinkMany = vi.fn();
const result = await hydratePhotoArchive(
{ recent: '10' },
mockMediaFilter
);
expect(result.mode).toBe('recent');
expect(linkMany).not.toHaveBeenCalled();
expect(unlinkMany).not.toHaveBeenCalled();
});
});
describe('year mode (year parameter only)', () => {