mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-29 10:06:13 +01:00
fix(emails): broken test due to sticky registration interstitial
This commit is contained in:
12
test/api.js
12
test/api.js
@@ -466,6 +466,18 @@ describe('API', async () => {
|
||||
csrfToken = config.csrf_token;
|
||||
}
|
||||
});
|
||||
|
||||
it('should back out of a registration interstitial if needed', async () => {
|
||||
const affectedPaths = ['GET /api/user/{userslug}/edit/email'];
|
||||
if (affectedPaths.includes(`${method.toUpperCase()} ${path}`)) {
|
||||
await request({
|
||||
uri: `${nconf.get('url')}/register/abort`,
|
||||
method: 'POST',
|
||||
jar,
|
||||
simple: false,
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user