mozilla/browserid — pull request #1636 by shane-tomlinson (2012-05-23 14:58:57+00:00)
Title: Fix the user being asked 4 times for a password when adding a secondary email to a primary account and verifying email ownership in a new browser.

@lloyd - can you review this one?

I took the same approach for the "email_staged" message as you did for the "user_staged" message and pass the password. The password gets handed to the check_registration controller which will try to log the user in if "email_addition_status" returns mustAuth.

* When "email_staged" is triggered, trigger it with the password.
* Rename helpers.addSecondaryEmailWithPassword to helpers.addSecondaryEmail
* Add unit tests for helpers.addSecondaryEmail
* Yak shave the unit tests to clean them up so that they are easier to follow.

issue #1555