mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
test: no need to create fake interstitial as NodeBB comes with some by default
This commit is contained in:
@@ -302,16 +302,6 @@ describe('Controllers', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should load /register/complete', (done) => {
|
it('should load /register/complete', (done) => {
|
||||||
function hookMethod(data, next) {
|
|
||||||
data.interstitials.push({ template: 'topic.tpl', data: {} });
|
|
||||||
next(null, data);
|
|
||||||
}
|
|
||||||
|
|
||||||
plugins.hooks.register('myTestPlugin', {
|
|
||||||
hook: 'filter:register.interstitial',
|
|
||||||
method: hookMethod,
|
|
||||||
});
|
|
||||||
|
|
||||||
const data = {
|
const data = {
|
||||||
username: 'interstitial',
|
username: 'interstitial',
|
||||||
password: '123456',
|
password: '123456',
|
||||||
@@ -347,7 +337,6 @@ describe('Controllers', () => {
|
|||||||
assert(body.sections);
|
assert(body.sections);
|
||||||
assert(body.errors);
|
assert(body.errors);
|
||||||
assert(body.title);
|
assert(body.title);
|
||||||
plugins.hooks.unregister('myTestPlugin', 'filter:register.interstitial', hookMethod);
|
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user