mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-02 20:16:04 +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
@@ -68,9 +68,13 @@ describe('API', async () => {
|
||||
async function dummySearchHook(data) {
|
||||
return [1];
|
||||
}
|
||||
async function dummyEmailerHook(data) {
|
||||
// pretend to handle sending emails
|
||||
}
|
||||
|
||||
after(async function () {
|
||||
plugins.unregisterHook('core', 'filter:search.query', dummySearchHook);
|
||||
plugins.unregisterHook('emailer-test', 'filter:email.send');
|
||||
});
|
||||
|
||||
async function setupData() {
|
||||
@@ -145,6 +149,11 @@ describe('API', async () => {
|
||||
hook: 'filter:search.query',
|
||||
method: dummySearchHook,
|
||||
});
|
||||
// Attach an emailer hook so related requests do not error
|
||||
plugins.registerHook('emailer-test', {
|
||||
hook: 'filter:email.send',
|
||||
method: dummyEmailerHook,
|
||||
});
|
||||
|
||||
jar = await helpers.loginUser('admin', '123456');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user