@@ -256,26 +256,6 @@ describe('Accounts', () => {
256
256
} )
257
257
) ;
258
258
} ) ;
259
-
260
- // it('can hash password with specified algorithm', async () => {
261
- // Accounts.config(
262
- // {
263
- // history,
264
- // passwordHashAlgorithm: 'sha256',
265
- // },
266
- // mockTransport
267
- // );
268
- // const hashed = {
269
- // digest: crypto
270
- // .createHash('sha256')
271
- // .update('password')
272
- // .digest('hex'),
273
- // algorithm: 'sha256',
274
- // };
275
- // await Accounts.loginWithService('username', 'password');
276
- // expect(mockTransport.loginWithService).toHaveBeenCalledTimes(1);
277
- // expect(mockTransport.loginWithService).toBeCalledWith('username', hashed);
278
- // });
279
259
} ) ;
280
260
281
261
describe ( 'logout' , ( ) => {
@@ -425,45 +405,6 @@ describe('Accounts', () => {
425
405
} ) ;
426
406
} ) ;
427
407
428
- // describe('requestVerificationEmail', () => {
429
- // it('should return an AccountsError', async () => {
430
- // const error = 'something bad';
431
- // Accounts.config(
432
- // {},
433
- // {
434
- // ...mockTransport,
435
- // sendVerificationEmail: () => Promise.reject({ message: error }),
436
- // }
437
- // );
438
- // try {
439
- // await Accounts.requestVerificationEmail('[email protected] ');
440
- // throw new Error();
441
- // } catch (err) {
442
- // expect(err.message).toEqual(error);
443
- // }
444
- // });
445
-
446
- // it('should call transport.sendVerificationEmail', async () => {
447
- // Accounts.config({}, mockTransport);
448
- // await Accounts.requestVerificationEmail('[email protected] ');
449
- // expect(mockTransport.sendVerificationEmail).toHaveBeenCalledTimes(1);
450
- // expect(mockTransport.sendVerificationEmail).toHaveBeenCalledWith(
451
-
452
- // );
453
- // });
454
-
455
- // it('should throw if an invalid email is provided', async () => {
456
- // Accounts.config({}, mockTransport);
457
- // try {
458
- // await Accounts.requestVerificationEmail('email');
459
- // throw new Error();
460
- // } catch (err) {
461
- // expect(err.message).toEqual('Valid email must be provided');
462
- // expect(mockTransport.sendVerificationEmail).not.toHaveBeenCalled();
463
- // }
464
- // });
465
- // });
466
-
467
408
describe ( 'impersonate' , ( ) => {
468
409
it ( 'should throw error if username is not provided' , async ( ) => {
469
410
await Accounts . config ( { history } , mockTransport ) ;
0 commit comments