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:
|
case FETCH_INDEXRESOURCES_SUCCESS:
|
||||||
return {
|
return {
|
||||||
...state,
|
...state,
|
||||||
indexResources: action.payload
|
links: action.payload._links
|
||||||
};
|
};
|
||||||
default:
|
default:
|
||||||
return state;
|
return state;
|
||||||
|
|||||||
@@ -141,6 +141,6 @@ describe("index resources reducer", () => {
|
|||||||
{},
|
{},
|
||||||
fetchIndexResourcesSuccess(indexResourcesAuthenticated)
|
fetchIndexResourcesSuccess(indexResourcesAuthenticated)
|
||||||
);
|
);
|
||||||
expect(newState.indexResources).toBe(indexResourcesAuthenticated);
|
expect(newState.links).toBe(indexResourcesAuthenticated._links);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user