Skip to content

Commit

Permalink
fix(price-ranges): update call to refine (#2377)
Browse files Browse the repository at this point in the history
  • Loading branch information
samouss authored and bobylito committed Sep 22, 2017
1 parent 13b1321 commit 34915d7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/components/PriceRanges/PriceRangesForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ class PriceRangesForm extends React.Component {
: undefined;
const to =
this.refs.to.value !== '' ? parseInt(this.refs.to.value, 10) : undefined;
this.props.refine(from, to, event);

this.props.refine({ from, to }, event);
}

render() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ describe('PriceRangesForm', () => {

// Then
expect(handleSubmitMock.calledOnce).toBe(true);
expect(refine.calledWith(10, 20)).toBe(true);
expect(refine.calledWith({ from: 10, to: 20 })).toBe(true);
});
});
});

0 comments on commit 34915d7

Please sign in to comment.