Exemplo n.º 1
0
 return it('can send an email confirmation', function() {
   const email = ld.first(user.unVerfiedEmails());
   email.sendVerification('1234');
   expect(Networking.perform).toHaveBeenCalledWith({
     method: 'PUT',
     url: 'http://localhost:2999/api/contact_infos/1234/confirm_by_pin.json',
     silenceErrors: true,
     withCredentials: true,
     data: { pin: '1234' },
   });
   return undefined;
 });
Exemplo n.º 2
0
 it('can request email confirmation', function() {
   const email = ld.first(user.unVerfiedEmails());
   expect(email).toBeTruthy();
   email.sendConfirmation();
   expect(Networking.perform).toHaveBeenCalledWith({
     method: 'PUT',
     url: 'http://localhost:2999/api/contact_infos/1234/resend_confirmation.json',
     silenceErrors: true,
     withCredentials: true,
     data: { send_pin: true },
   });
   return undefined;
 });