add unit test for email confirm