Explorar o código

pass simple updating

kaori %!s(int64=4) %!d(string=hai) anos
pai
achega
fbda8f47d6

+ 7 - 3
packages/app/test/integration/service/v5.user-groups.test.ts

@@ -60,10 +60,14 @@ describe('UserGroupService', () => {
      */
   test('Can update user group basic info', async() => {
     const userGroup = await UserGroup.findOne({ name: 'v5_group1' });
-    await crowi.serGroupService.updateGroup(userGroup.id, 'v5_group1_new', 'description1_new');
 
-    expect(userGroup.name).toBe('v5_group1_new');
-    expect(userGroup.description).toBe('description1_new');
+    const newGroupName = 'v5_group1_new';
+    const newGroupDescription = 'description1_new';
+
+    const updatedUserGroup = await crowi.userGroupService.updateGroup(userGroup.id, newGroupName, newGroupDescription);
+
+    expect(updatedUserGroup.name).toBe(newGroupName);
+    expect(updatedUserGroup.description).toBe(newGroupDescription);
   });
 
 });