test(trips): the removal names who removed

This commit is contained in:
Maurice
2026-10-24 08:58:56 +02:00
parent fc27b254bb
commit 1487ad97f1
2 changed files with 2 additions and 2 deletions
@@ -174,7 +174,7 @@ describe('TripMembersController', () => {
expect(await tc(s).removeMember(user, '9', '1', 'sock')).toEqual({ success: true });
// The parsed trip id, as the removal itself takes it; member:removed goes out from the use case.
expect(writes.removeMember).toHaveBeenCalledWith(9, 1, restWriter('sock'));
expect(removeMember).toHaveBeenCalledWith(9, 1);
expect(removeMember).toHaveBeenCalledWith(9, 1, 1);
expect(await thrown(() => tc(s).removeMember(user, '9', '2'))).toEqual({
status: 403,
body: { error: 'No permission to remove members' },
+1 -1
View File
@@ -371,7 +371,7 @@ describe('TripsRpc membership', () => {
it('TRIPS-RPC-017 a non-owner member is removed', async () => {
const f = build();
expect((await f.host().dispatch(req('trips.removeMember', { tripId: 1, userId: 7 }), 42)).ok).toBe(true);
expect(f.roster.removeMember).toHaveBeenCalledWith(1, 7);
expect(f.roster.removeMember).toHaveBeenCalledWith(1, 7, 42);
expect(f.realtime.broadcast).toHaveBeenCalledWith(1, 'member:removed', { userId: 7 });
});