Skip to content

Commit 9e6fce1

Browse files
committed
fix: more tests for group service
1 parent e51cf8e commit 9e6fce1

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

src/client/shared/services/group/__tests__/group-service.spec.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@ import { GroupServiceEngine } from '..';
77
const apolloClientMock = createMockClient();
88

99
describe('Group Service', () => {
10+
it('can get all groups (rest)', async () => {
11+
const allGroups = await GroupServiceEngine.requestAllGroupsRest({
12+
apolloClientMock,
13+
data: {}
14+
});
15+
expect((allGroups.subscribe() as any).data).toStrictEqual(undefined);
16+
});
17+
1018
it('can get all groups', () => {
1119
const allGroups = GroupServiceEngine.requestAllGroups({
1220
apolloClientMock,

src/client/shared/services/group/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ class GroupService {
7070
}
7171

7272
export const GroupServiceEngine = {
73+
requestAllGroupsRest: action => GroupService.getGroupsRest(action),
7374
requestAllGroups: action => GroupService.getAllGroups(action),
7475
createGroup: action => GroupService.createGroup(action),
7576
updateGroup: action => GroupService.updateGroup(action),

0 commit comments

Comments
 (0)