mirror of
https://github.com/bulwarkmail/webmail.git
synced 2026-10-31 00:12:39 +00:00
test: use a sidecar path instead of the now-denied translate route in the plugin POST test
This commit is contained in:
@@ -61,7 +61,9 @@ describe('plugin http.post denied paths', () => {
|
||||
});
|
||||
|
||||
it('still reaches a plugin sidecar route', async () => {
|
||||
await dispatchApiCall(plugin(['/api/translate']), 'http.post', ['/api/translate', { text: 'hi' }]);
|
||||
// /api/translate used to be the example here; it is a third-party relay
|
||||
// with the user's cookies and is denied now like the other app routes.
|
||||
await dispatchApiCall(plugin(['/api/my-plugin/translate']), 'http.post', ['/api/my-plugin/translate', { text: 'hi' }]);
|
||||
expect(fetchSpy).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user