node-radius-server/__tests__/auth/smtp.test.ts
simon 3f600c664f feat: add more auth providers and cleanup google auth
it's no longer needed to use stunnel ;-)
2020-02-23 20:42:36 +01:00

19 lines
434 B
TypeScript

import 'mocha';
import { expect } from 'chai';
import { SMTPAuth } from '../../src/auth/SMTPAuth';
describe('test smtp auth', () => {
it('authenticate against smtp server', async () => {
const auth = new SMTPAuth({
host: 'smtp.gmail.com',
port: 465,
useSecureTransport: true,
validHosts: ['gmail.com']
});
const result = await auth.authenticate('username', 'password');
expect(result).to.equal(true);
});
});