From a899d2c54de8b15df988d8155c45e71e035db2b5 Mon Sep 17 00:00:00 2001 From: Nick Martin Date: Tue, 3 Dec 2013 02:40:17 -0800 Subject: [PATCH] =?UTF-8?q?Remove=20email=20stubbing=20code=20that=20wasn?= =?UTF-8?q?=E2=80=99t=20safe=20for=20running=20multiple=20times=20on=20the?= =?UTF-8?q?=20server.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/accounts-password/password_tests.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/packages/accounts-password/password_tests.js b/packages/accounts-password/password_tests.js index d4e1c70e61..16f99855fc 100644 --- a/packages/accounts-password/password_tests.js +++ b/packages/accounts-password/password_tests.js @@ -488,18 +488,14 @@ if (Meteor.isServer) (function () { Tinytest.add( 'passwords - createUser hooks', function (test) { - var email = Random.id() + '@example.com'; + var username = Random.id(); test.throws(function () { // should fail the new user validators - Accounts.createUser({email: email, profile: {invalid: true}}); - }); + Accounts.createUser({username: username, profile: {invalid: true}}); + }); - // disable sending emails - var oldEmailSend = Email.send; - Email.send = function() {}; - var userId = Accounts.createUser({email: email, + var userId = Accounts.createUser({username: username, testOnCreateUserHook: true}); - Email.send = oldEmailSend; test.isTrue(userId); var user = Meteor.users.findOne(userId);