diff --git a/src/reducers/groupSlice.js b/src/reducers/groupSlice.js index 23ddd28..ebf38b3 100644 --- a/src/reducers/groupSlice.js +++ b/src/reducers/groupSlice.js @@ -205,8 +205,10 @@ export const updateConfirmParticipant = (userEmail) => async (dispatch, getState })); }; -export const deleteGroup = (groupId) => async () => { +export const deleteGroup = (groupId) => async (dispatch) => { await deletePostGroup(groupId); + + dispatch(loadStudyGroups()); }; export default reducer; diff --git a/src/reducers/groupSlice.test.js b/src/reducers/groupSlice.test.js index f19681b..f22c4bc 100644 --- a/src/reducers/groupSlice.test.js +++ b/src/reducers/groupSlice.test.js @@ -382,7 +382,12 @@ describe('async actions', () => { const actions = store.getActions(); - expect(actions[0]).toEqual(); + expect(actions[0]).toEqual( + { + payload: [], + type: 'group/setStudyGroups', + }, + ); }); }); });