feat(mindspace): enforce PostgreSQL user data delivery
This commit is contained in:
@@ -316,6 +316,7 @@ test('syncUserWorkspace imports nested workspace files into asset library', asyn
|
||||
const workspace = resolveUserWorkspaceRoot(h5Root, { id: 'user-1', username: 'john' });
|
||||
await fs.mkdir(path.join(workspace, 'oa', '暑假实习报告'), { recursive: true });
|
||||
await fs.writeFile(path.join(workspace, 'oa', '暑假实习报告', 'report.csv'), 'a,b\n1,2\n');
|
||||
await fs.writeFile(path.join(workspace, 'oa', 'historical.csv'), 'old,data\n3,4\n');
|
||||
|
||||
const state = {
|
||||
categories: [
|
||||
@@ -417,7 +418,10 @@ test('syncUserWorkspace imports nested workspace files into asset library', asyn
|
||||
idFactory: () => `id-${++nextId}`,
|
||||
});
|
||||
|
||||
const result = await sync.syncUserWorkspace('user-1', { categoryCode: 'oa' });
|
||||
const result = await sync.syncUserWorkspace('user-1', {
|
||||
categoryCode: 'oa',
|
||||
onlyRelativePaths: ['oa/暑假实习报告/report.csv'],
|
||||
});
|
||||
assert.equal(result.imported, 1);
|
||||
assert.equal(state.assets[0].original_filename, '暑假实习报告/report.csv');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user