Merge pull request #4618 from tgxworld/fix_invalid_emails

FIX: Don't allow invalid email to be saved.
This commit is contained in:
Guo Xiang Tan
2016-12-30 07:11:48 +08:00
committed by GitHub
13 changed files with 97 additions and 18 deletions

View File

@ -36,6 +36,12 @@ test("about me", () => {
test("email", () => {
visit("/users/eviltrout/preferences/email");
andThen(() => {
ok(exists("#change_email"), "it has the input element");
ok(exists("#change-email"), "it has the input element");
});
fillIn("#change-email", 'invalidemail');
andThen(() => {
equal(find('.tip.bad').text().trim(), I18n.t('user.email.invalid'), 'it should display invalid email tip');
});
});