fix(emails): broken test due to sticky registration interstitial

This commit is contained in:
Julian Lam
2021-06-18 12:15:42 -04:00
parent a3a3b10fb3
commit ab9b671693
2 changed files with 23 additions and 11 deletions

View File

@@ -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,
});
}
});
});
});
}