mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
tests: solvedextra params in email urls
This commit is contained in:
@@ -1866,20 +1866,21 @@ if (Meteor.isServer) (() => {
|
||||
); // default number of rounds.
|
||||
|
||||
|
||||
Tinytest.add('passwords - extra params in email urls', (test) => {
|
||||
Tinytest.addAsync('passwords - extra params in email urls',
|
||||
async (test) => {
|
||||
const username = Random.id();
|
||||
const email = `${ username }-intercept@example.com`;
|
||||
|
||||
const userId = Accounts.createUser({
|
||||
const userId = await Accounts.createUser({
|
||||
username: username,
|
||||
email: email
|
||||
});
|
||||
|
||||
const extraParams = { test: 'success' };
|
||||
Accounts.sendEnrollmentEmail(userId, email, null, extraParams);
|
||||
await Accounts.sendEnrollmentEmail(userId, email, null, extraParams);
|
||||
|
||||
const [enrollPasswordEmailOptions] =
|
||||
Meteor.callAsync("getInterceptedEmails", email);
|
||||
await Meteor.callAsync("getInterceptedEmails", email);
|
||||
|
||||
const re = new RegExp(`${Meteor.absoluteUrl()}(\\S*)`);
|
||||
const match = enrollPasswordEmailOptions.text.match(re);
|
||||
|
||||
Reference in New Issue
Block a user