Exemple #1
0
 onVkLogin: (props) => (data) => {
   const { dispatch, master } = props;
   const id = `VK-${data.id}`;
   const name = `${data.first_name} ${data.last_name}`;
   const photo = data.photo_50;
   dispatch(auth({ name, photo, master, id }));
 },
Exemple #2
0
  it('calls onSubmit when the form is filled correctly', () => {
    const expectedAction = auth();

    setTextToInputThenBlur(page, 'Zeus');
    page.form().simulate('submit');
    expect(dispatchSpy).toHaveBeenCalledTimes(1);
    expect(dispatchSpy.mock.calls[0][0].type).toBe(expectedAction.type);
  });
Exemple #3
0
    onSubmit: (props) => (data) => {
      const { dispatch } = props;
      const { username, master, remember } = data;

      dispatch(auth({ name: username, master }, remember));
    },