chore: cleanup outdated api (#6604)

This commit is contained in:
darkskygit
2024-04-18 14:42:45 +00:00
parent a537f8eb0b
commit b3b9e9a056
9 changed files with 21 additions and 104 deletions

View File

@@ -10,7 +10,6 @@ import {
createTestingApp,
createWorkspace,
currentUser,
getPublicWorkspace,
getWorkspacePublicPages,
inviteUser,
publishPage,
@@ -87,20 +86,6 @@ test('should can publish workspace', async t => {
t.false(isPrivate, 'failed to unpublish workspace');
});
test('should can read published workspace', async t => {
const { app } = t.context;
const user = await signUp(app, 'u1', 'u1@affine.pro', '1');
const workspace = await createWorkspace(app, user.token.token);
await t.throwsAsync(() => getPublicWorkspace(app, 'not_exists_ws'));
await t.throwsAsync(() => getPublicWorkspace(app, workspace.id));
await updateWorkspace(app, user.token.token, workspace.id, true);
const publicWorkspace = await getPublicWorkspace(app, workspace.id);
t.is(publicWorkspace.id, workspace.id, 'failed to get public workspace');
});
test('should share a page', async t => {
const { app } = t.context;
const u1 = await signUp(app, 'u1', 'u1@affine.pro', '1');