fixed broken tests and completed test coverage for sending email when
email address edited