node-radius-server/__tests__/auth/smtp.test.ts

19 lines
435 B
TypeScript
Raw Normal View History

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,
2020-05-14 13:02:15 +00:00
validHosts: ['gmail.com'],
});
const result = await auth.authenticate('username', 'password');
expect(result).to.equal(true);
});
});