improve reducer

This commit is contained in:
Maren Süwer
2018-10-05 11:28:27 +02:00
parent db97fc89ea
commit ee89d7ecd0
2 changed files with 2 additions and 2 deletions

View File

@@ -67,7 +67,7 @@ export default function reducer(
case FETCH_INDEXRESOURCES_SUCCESS:
return {
...state,
indexResources: action.payload
links: action.payload._links
};
default:
return state;

View File

@@ -141,6 +141,6 @@ describe("index resources reducer", () => {
{},
fetchIndexResourcesSuccess(indexResourcesAuthenticated)
);
expect(newState.indexResources).toBe(indexResourcesAuthenticated);
expect(newState.links).toBe(indexResourcesAuthenticated._links);
});
});