mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-21 20:16:26 +08:00
fix(server): add guid compatibility of :space:page variant (#5062)
This commit is contained in:
@@ -70,3 +70,13 @@ test('fix', t => {
|
||||
t.is(id.workspace, 'ws');
|
||||
t.is(id.toString(), 'ws:space:sub');
|
||||
});
|
||||
|
||||
test('special case: `wsId:space:page:pageId`', t => {
|
||||
const id = new DocID('ws:space:page:page');
|
||||
t.is(id.workspace, 'ws');
|
||||
t.is(id.guid, 'page');
|
||||
|
||||
t.throws(() => new DocID('ws:s:p:page'));
|
||||
t.throws(() => new DocID('ws:space:b:page'));
|
||||
t.throws(() => new DocID('ws:s:page:page'));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user