From cc4b3e3acbd7c2b158169e896feeb23d5bdf8df5 Mon Sep 17 00:00:00 2001 From: SuZhou-Joe Date: Sat, 23 Sep 2023 17:13:33 +0800 Subject: [PATCH] feat: update test Signed-off-by: SuZhou-Joe --- .../server/integration_tests/routes.test.ts | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/plugins/workspace/server/integration_tests/routes.test.ts b/src/plugins/workspace/server/integration_tests/routes.test.ts index e4d29b86ac5..ef6c6a3e0a6 100644 --- a/src/plugins/workspace/server/integration_tests/routes.test.ts +++ b/src/plugins/workspace/server/integration_tests/routes.test.ts @@ -6,11 +6,20 @@ import { WorkspaceAttribute } from 'src/core/types'; import { omit } from 'lodash'; import * as osdTestServer from '../../../../core/test_helpers/osd_server'; +import { WorkspaceRoutePermissionItem } from '../types'; +import { WorkspacePermissionMode } from '../../../../core/server'; -const testWorkspace: WorkspaceAttribute = { +const testWorkspace: WorkspaceAttribute & { + permissions: WorkspaceRoutePermissionItem; +} = { id: 'fake_id', name: 'test_workspace', description: 'test_workspace_description', + permissions: { + modes: [WorkspacePermissionMode.Management], + type: 'user', + userId: '*', + }, }; describe('workspace service', () => { @@ -140,7 +149,7 @@ describe('workspace service', () => { page: 1, }) .expect(200); - expect(listResult.body.result.total).toEqual(1); + expect(listResult.body.result.total).toEqual(4); }); }); });