mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 11:35:55 +01:00
fix: email testing and settings change from ACP
- changing email SMTP settings wouldn't apply the first time - "Send Test Email" now will report emailer errors in most cases
This commit is contained in:
committed by
Julian Lam
parent
713f029dc8
commit
2be396ff6e
@@ -240,6 +240,21 @@ describe('socket.io', function () {
|
||||
|
||||
describe('validation emails', function () {
|
||||
var meta = require('../src/meta');
|
||||
var plugins = require('../src/plugins');
|
||||
|
||||
async function dummyEmailerHook(data) {
|
||||
// pretend to handle sending emails
|
||||
}
|
||||
before(function () {
|
||||
// Attach an emailer hook so related requests do not error
|
||||
plugins.registerHook('emailer-test', {
|
||||
hook: 'filter:email.send',
|
||||
method: dummyEmailerHook,
|
||||
});
|
||||
});
|
||||
after(function () {
|
||||
plugins.unregisterHook('emailer-test', 'filter:email.send');
|
||||
});
|
||||
|
||||
it('should validate emails', function (done) {
|
||||
socketAdmin.user.validateEmail({ uid: adminUid }, [regularUid], function (err) {
|
||||
|
||||
Reference in New Issue
Block a user