Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -142,20 +142,4 @@ describe('activityManagementReducer', () => {
expect(state.message).toEqual('Something went wrong unarchiving activities!');
expect(state.isLoading).toBeFalse();
});

it('on SetActivityToEdit, should save the activityId to edit', () => {
const action = new actions.SetActivityToEdit(activity.id);

const state = activityManagementReducer(initialState, action);

expect(state.activityIdToEdit).toEqual('1');
});

it('on ResetActivityToEdit, should clean the activityIdToEdit variable', () => {
const action = new actions.ResetActivityToEdit();

const state = activityManagementReducer(initialState, action);

expect(state.activityIdToEdit).toEqual('');
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ export function activityManagementReducer(state: ActivityState = initialState, a
...state,
isLoading: true,
message: 'Set activityIdToArchive property',
activityIdToEdit: action.activityId,
};
}

Expand All @@ -89,7 +88,6 @@ export function activityManagementReducer(state: ActivityState = initialState, a
data: [],
isLoading: false,
message: 'Something went wrong deleting activity!',
activityIdToEdit: '',
};
}

Expand Down Expand Up @@ -127,7 +125,6 @@ export function activityManagementReducer(state: ActivityState = initialState, a
...state,
isLoading: true,
message: 'Set activityIdToUnarchive property',
activityIdToEdit: action.payload,
};
}

Expand All @@ -140,7 +137,6 @@ export function activityManagementReducer(state: ActivityState = initialState, a
data: activityList,
isLoading: false,
message: 'Unarchive activity successfully!',
activityIdToEdit: '',
};
}

Expand All @@ -149,7 +145,6 @@ export function activityManagementReducer(state: ActivityState = initialState, a
...state,
isLoading: false,
message: 'Something went wrong unarchiving activities!',
activityIdToEdit: '',
};
}

Expand Down