Skip to content

Commit

Permalink
Fix: Collections reducer failing test logic (#2573)
Browse files Browse the repository at this point in the history
  • Loading branch information
thewahome authored May 15, 2023
1 parent db86b90 commit 5e47981
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/services/reducers/collections-reducer.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,13 @@ describe('Collections Reducer', () => {

it('should handle RESOURCEPATHS_ADD_SUCCESS and return new state with the paths', () => {
const newState = [...initialState];
newState[0].paths = resourceLinks;
newState[0].paths = [];
const action_ = {
type: RESOURCEPATHS_ADD_SUCCESS,
response: paths
}
const state_ = collections(newState, action_);
expect(state_[0].paths).toEqual(resourceLinks);
expect(state_[0].paths.length).toEqual(resourceLinks.length);
});

it('should handle RESOURCEPATHS_DELETE_SUCCESS and return new state with no resource paths', () => {
Expand Down

0 comments on commit 5e47981

Please sign in to comment.