summaryrefslogtreecommitdiff
path: root/modules/system/system.test
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2010-07-07 08:05:01 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2010-07-07 08:05:01 +0000
commitea4f6bcef2f1c3ba8f84115d3de3af0d8e5820d2 (patch)
tree5561cfced677d44bff71b9b2955139cec9387226 /modules/system/system.test
parenta8812bb727a08296a2029fcb055767bc4b783fb0 (diff)
downloadbrdo-ea4f6bcef2f1c3ba8f84115d3de3af0d8e5820d2.tar.gz
brdo-ea4f6bcef2f1c3ba8f84115d3de3af0d8e5820d2.tar.bz2
#363580 by rfay, chx, Berdir, Rob Loach, Gábor Hojtsy, Shawn DeArmond: Fixed OpenID login fails when in maintenance mode, and 403 errors on certain user paths for logged-in users.
Diffstat (limited to 'modules/system/system.test')
-rw-r--r--modules/system/system.test19
1 files changed, 17 insertions, 2 deletions
diff --git a/modules/system/system.test b/modules/system/system.test
index 7d6619802..e456e3744 100644
--- a/modules/system/system.test
+++ b/modules/system/system.test
@@ -770,8 +770,6 @@ class SiteMaintenanceTestCase extends DrupalWebTestCase {
$this->assertText($offline_message);
$this->drupalGet('user/register');
$this->assertText($offline_message);
- $this->drupalGet('user/password');
- $this->assertText($offline_message);
// Verify that user is able to log in.
$this->drupalGet('user');
@@ -804,6 +802,23 @@ class SiteMaintenanceTestCase extends DrupalWebTestCase {
$this->drupalLogout();
$this->drupalGet('');
$this->assertRaw($offline_message, t('Found the site offline message.'));
+
+ // Verify that custom site offline message is not displayed on user/password.
+ $this->drupalGet('user/password');
+ $this->assertText(t('Username or e-mail address'), t('Anonymous users can access user/password'));
+
+ // Submit password reset form.
+ $edit = array(
+ 'name' => $this->user->name,
+ );
+ $this->drupalPost('user/password', $edit, t('E-mail new password'));
+ $mails = $this->drupalGetMails();
+ $start = strpos($mails[0]['body'], 'user/reset/'. $this->user->uid);
+ $path = substr($mails[0]['body'], $start, 66 + strlen($this->user->uid));
+
+ // Log in with temporary login link.
+ $this->drupalPost($path, array(), t('Log in'));
+ $this->assertText($user_message);
}
}