Skip to content

Commit

Permalink
chore: remove query field on groups messages listing
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardogarim committed Oct 26, 2024
1 parent c39e1f0 commit f0e0cab
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions apps/meteor/tests/data/groups.helper.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { api, credentials, request } from './api-data';

export const createGroup = ({ name }: { name: string }) => {
if (!name) {
throw new Error('"name" is required in "createGroup" test helper');
}
return request.post(api('groups.create')).set(credentials).send({ name });
};

export const deleteGroup = ({ groupId, roomName }: { groupId?: string; roomName?: string }) => {
if (!groupId && !roomName) {
throw new Error('"groupId" or "roomName" is required in "deleteGroup" test helper');
}

return request
.post(api('groups.delete'))
.set(credentials)
.send({
...(groupId && { groupId }),
...(roomName && { roomName }),
});
};

0 comments on commit f0e0cab

Please sign in to comment.