Commit c1b3efe5 authored by Ben Wheeler's avatar Ben Wheeler

corrected mocked function name

parent 8c30051b
......@@ -37,14 +37,14 @@ describe('Navigation', () => {
}
});
const props = {
handleRegistrationRequested: jest.fn()
handleClickRegistration: jest.fn()
};
const navWrapper = getNavigationWrapper(props);
const navInstance = navWrapper.instance();
// simulate click, with mocked event
navWrapper.find('a.registrationLink').simulate('click', {preventDefault () {}});
expect(navInstance.props.handleRegistrationRequested).toHaveBeenCalled();
expect(navInstance.props.handleClickRegistration).toHaveBeenCalled();
});
test('when using new join flow, clicking Join Scratch calls handleRegistrationRequested', () => {
......@@ -60,12 +60,12 @@ describe('Navigation', () => {
}
});
const props = {
handleRegistrationRequested: jest.fn()
handleClickRegistration: jest.fn()
};
const navWrapper = getNavigationWrapper(props);
const navInstance = navWrapper.instance();
navWrapper.find('a.registrationLink').simulate('click', {preventDefault () {}});
expect(navInstance.props.handleRegistrationRequested).toHaveBeenCalled();
expect(navInstance.props.handleClickRegistration).toHaveBeenCalled();
});
});
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