Commit b927acc6 authored by Christoph Häfner's avatar Christoph Häfner

Switch parameter to parameter object in startEmptyProcess

parent 383ec43a
Pipeline #455 passed with stages
in 14 minutes and 16 seconds
......@@ -13,7 +13,9 @@ export default class MovieCollectionItem extends React.Component {
}
rate(evt) {
this.dispatch(RateProcessActions.startEmptyProcess(this.props.id));
this.dispatch(RateProcessActions.startEmptyProcess({
id: this.props.id
}));
this.router.push('/rate?id='+this.props.id);
}
......
import hashCode from '../../hashCode';
export const START_EMPTY_PROCESS = 'START_EMPTY_PROCESS';
export const startEmptyProcess = (id) => {
export const startEmptyProcess = (payload) => {
return {
type: START_EMPTY_PROCESS,
id: id
id: payload.id,
payload
};
};
......
......@@ -19,7 +19,9 @@ describe('process reducer', () => {
it('should start an empty comparison process', {
stateBefore: {},
action: Actions.startEmptyProcess('673655561'),
action: Actions.startEmptyProcess({
id: '673655561',
}),
stateAfter: {
'673655561': {
finished: false
......
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