mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-08 14:35:45 +01:00
improve reducer
This commit is contained in:
@@ -67,7 +67,7 @@ export default function reducer(
|
||||
case FETCH_INDEXRESOURCES_SUCCESS:
|
||||
return {
|
||||
...state,
|
||||
indexResources: action.payload
|
||||
links: action.payload._links
|
||||
};
|
||||
default:
|
||||
return state;
|
||||
|
||||
@@ -141,6 +141,6 @@ describe("index resources reducer", () => {
|
||||
{},
|
||||
fetchIndexResourcesSuccess(indexResourcesAuthenticated)
|
||||
);
|
||||
expect(newState.indexResources).toBe(indexResourcesAuthenticated);
|
||||
expect(newState.links).toBe(indexResourcesAuthenticated._links);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user