summaryrefslogtreecommitdiff
path: root/modules/user
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2010-05-07 14:48:10 +0000
committerDries Buytaert <dries@buytaert.net>2010-05-07 14:48:10 +0000
commit66d75d16fcc1e531811fb3bcf32a2f4318c01588 (patch)
tree42c1ac25c056d8366c169ec7588fbb86dd8a9f06 /modules/user
parentb0ab9f287eae65d24c1d00cfc67cd37339f5ae46 (diff)
downloadbrdo-66d75d16fcc1e531811fb3bcf32a2f4318c01588.tar.gz
brdo-66d75d16fcc1e531811fb3bcf32a2f4318c01588.tar.bz2
- Patch #547490 by ugerhard, Jody Lynn, Matt V.: entering only 'Confirm password' field passes validation and returns success message.
Diffstat (limited to 'modules/user')
-rw-r--r--modules/user/user.test14
1 files changed, 13 insertions, 1 deletions
diff --git a/modules/user/user.test b/modules/user/user.test
index 78e121672..732782d6a 100644
--- a/modules/user/user.test
+++ b/modules/user/user.test
@@ -55,7 +55,7 @@ class UserRegistrationTestCase extends DrupalWebTestCase {
$edit['pass[pass1]'] = '99999.0';
$edit['pass[pass2]'] = '99999';
$this->drupalPost('user/register', $edit, t('Create new account'));
- $this->assertText(t('The specified passwords do not match.'), t('Type mismatched passwords display an error message.'));
+ $this->assertText(t('The specified passwords do not match.'), t('Typing mismatched passwords displays an error message.'));
// Enter a correct password.
$edit['pass[pass1]'] = $new_pass = $this->randomName();
@@ -1391,6 +1391,18 @@ class UserEditTestCase extends DrupalWebTestCase {
$this->drupalPost("user/$user1->uid/edit", $edit, t('Save'));
$this->assertRaw(t('The name %name is already taken.', array('%name' => $edit['name'])));
+ // Check that filling out a single password field does not validate.
+ $edit = array();
+ $edit['pass[pass1]'] = '';
+ $edit['pass[pass2]'] = $this->randomName();
+ $this->drupalPost("user/$user1->uid/edit", $edit, t('Save'));
+ $this->assertText(t("The specified passwords do not match."), t('Typing mismatched passwords displays an error message.'));
+
+ $edit['pass[pass1]'] = $this->randomName();
+ $edit['pass[pass2]'] = '';
+ $this->drupalPost("user/$user1->uid/edit", $edit, t('Save'));
+ $this->assertText(t("The specified passwords do not match."), t('Typing mismatched passwords displays an error message.'));
+
// Test that the error message appears when attempting to change the mail or
// pass without the current password.
$edit = array();