From d5e479291eaa5bfe2274a0f362db217ace415256 Mon Sep 17 00:00:00 2001 From: harryadel Date: Fri, 28 Mar 2025 23:03:24 +0200 Subject: [PATCH] Fix test --- packages/accounts-password/password_tests.js | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/packages/accounts-password/password_tests.js b/packages/accounts-password/password_tests.js index 08c9b0c4ca..8b14a84b9f 100644 --- a/packages/accounts-password/password_tests.js +++ b/packages/accounts-password/password_tests.js @@ -1790,28 +1790,22 @@ if (Meteor.isServer) (() => { }); Tinytest.addAsync("passwords, replace email", async test => { - const origEmail = `${ Random.id() }@turing.com`; + const origEmail = `originalemail@test.com`; const userId = await Accounts.createUser({ email: origEmail }); - const newEmail = `${ Random.id() }@turing.com`; - await Accounts.addEmailAsync(userId, newEmail); + const newEmail = `newemail@test.com`; - const thirdEmail = `${ Random.id() }@turing.com`; - await Accounts.addEmailAsync(userId, thirdEmail, true); const u1 = await Accounts._findUserByQuery({ id: userId }) test.equal(u1.emails, [ - { address: origEmail, verified: false }, - { address: newEmail, verified: false }, - { address: thirdEmail, verified: true } + { address: origEmail, verified: false } ]); - await Accounts.replaceEmailAsync(userId, newEmail, thirdEmail); + await Accounts.replaceEmailAsync(userId, origEmail, newEmail); const u2 = await Accounts._findUserByQuery({ id: userId }) test.equal(u2.emails, [ - { address: origEmail, verified: false }, - { address: thirdEmail, verified: true } + { address: newEmail, verified: false } ]); })