Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fix: TT-299 removal of variables and tests that are no longer neccessary
  • Loading branch information
bytesantiago committed Aug 2, 2021
commit e269427bf8a2c8ab621a7a6920e7e7a3d9045d28
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: undefined,
};
}

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: undefined,
};
}

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