From a3de0eeee6236fb43d543aeca210e8edd1393472 Mon Sep 17 00:00:00 2001 From: Shane Tomlinson <stomlinson@mozilla.com> Date: Fri, 27 Apr 2012 19:09:41 +0100 Subject: [PATCH] Remove duplicate reset_password through to email validation test. Update remaining reset_password test to deal with new flow when the user confirms the address. --- .../static/test/cases/resources/state.js | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/resources/static/test/cases/resources/state.js b/resources/static/test/cases/resources/state.js index d97feac69..83e6c7cf6 100644 --- a/resources/static/test/cases/resources/state.js +++ b/resources/static/test/cases/resources/state.js @@ -224,9 +224,15 @@ // screen. // user_confirmed means the user has confirmed their email and the dialog - // has received the "complete" message from /wsapi/user_creation_status - mediator.publish("user_confirmed"); - equal(actions.info.doEmailConfirmed.email, TEST_EMAIL, "email successfully verified, doEmailConfirmed called with the correct email"); + // has received the "complete" message from /wsapi/user_creation_status. + try { + mediator.publish("user_confirmed"); + } catch(e) { + // Exception is expected because as part of the user confirmation + // process, before user_confirmed is called, email addresses are synced. + // Addresses are not synced in this test. + equal(e.toString(), "invalid email", "expected failure"); + } }); @@ -242,14 +248,6 @@ equal(actions.info.doAuthenticate.email, TEST_EMAIL, "authenticate called with the correct email"); }); - test("reset_password through to validation on same browser - call doEmailConfirmed with email address", function() { - mediator.publish("reset_password", { email: TEST_EMAIL }); - mediator.publish("user_confirmed"); - - equal(actions.info.doEmailConfirmed.email, TEST_EMAIL, "doEmailConfirmed called with correct email"); - }); - - asyncTest("assertion_generated with null assertion - redirect to pick_email", function() { mediator.subscribe("pick_email", function() { ok(true, "redirect to pick_email"); -- GitLab