(extra?: { secondOwnerId?: string })
| 1121 | // The home workspace (group id === userId) can't be invited to, left, deleted, |
| 1122 | // or have its members managed. (It can be renamed.) |
| 1123 | function homeState(extra?: { secondOwnerId?: string }) { |
| 1124 | const group_user: TlaGroupUser[] = [makeGroupUser({ userId, groupId: userId, role: 'owner' })] |
| 1125 | const user = [makeUser({ id: userId, flags: 'groups_backend' })] |
| 1126 | if (extra?.secondOwnerId) { |
| 1127 | group_user.push( |
| 1128 | makeGroupUser({ userId: extra.secondOwnerId, groupId: userId, role: 'owner' }) |
| 1129 | ) |
| 1130 | user.push(makeUser({ id: extra.secondOwnerId, flags: 'groups_backend' })) |
| 1131 | } |
| 1132 | return { |
| 1133 | user, |
| 1134 | file: [], |
| 1135 | file_state: [], |
| 1136 | group: [makeGroup({ id: userId })], |
| 1137 | group_user, |
| 1138 | group_file: [], |
| 1139 | } satisfies TableStore |
| 1140 | } |
| 1141 | |
| 1142 | it('can rename home workspace', async () => { |
| 1143 | const { tx } = createMockTx(homeState()) |
no test coverage detected
searching dependent graphs…