Commit 0c94f3fe authored by Christoph Häfner's avatar Christoph Häfner

Add personalMovieListLength to startEmptyProcess parameters

parent b927acc6
Pipeline #456 passed with stages
in 11 minutes and 30 seconds
......@@ -14,7 +14,8 @@ export default class MovieCollectionItem extends React.Component {
rate(evt) {
this.dispatch(RateProcessActions.startEmptyProcess({
id: this.props.id
id: this.props.id,
personalMovieListLength: this.props.rate.personalMovieList.length
}));
this.router.push('/rate?id='+this.props.id);
}
......
......@@ -11,6 +11,9 @@ describe("MovieCollectionItem", () => {
dispatch: jest.fn(),
router: {
push: jest.fn()
},
rate: {
personalMovieList: []
}
}
it('should redirect if rate button is clicked', () => {
......
......@@ -21,6 +21,7 @@ describe('process reducer', () => {
stateBefore: {},
action: Actions.startEmptyProcess({
id: '673655561',
personalMovieListLength: 0
}),
stateAfter: {
'673655561': {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment