diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-07-23 20:58:26 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-07-23 20:58:26 +0000 |
commit | 708f3b970fe756efb7395e54dff488fb8016b4dc (patch) | |
tree | 6dc9da5aa362015f1660c4351335567df0649e85 /modules/system/system.test | |
parent | 3295866fad4b63dc8b937dc5b5aa481af22db2c3 (diff) | |
download | brdo-708f3b970fe756efb7395e54dff488fb8016b4dc.tar.gz brdo-708f3b970fe756efb7395e54dff488fb8016b4dc.tar.bz2 |
#292565 follow-up by John Morahan: Restore ability to set 'user' as the 403/404 page.
Diffstat (limited to 'modules/system/system.test')
-rw-r--r-- | modules/system/system.test | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/modules/system/system.test b/modules/system/system.test index ad262e03f..a48cbd95a 100644 --- a/modules/system/system.test +++ b/modules/system/system.test @@ -510,7 +510,7 @@ class AccessDeniedTestCase extends DrupalWebTestCase { parent::setUp(); // Create an administrative user. - $this->admin_user = $this->drupalCreateUser(array('administer site configuration')); + $this->admin_user = $this->drupalCreateUser(array('administer site configuration', 'administer blocks')); $this->drupalLogin($this->admin_user); } @@ -547,6 +547,22 @@ class AccessDeniedTestCase extends DrupalWebTestCase { $this->drupalGet('admin'); $this->assertText(t('Access denied'), t('Found the default 403 page')); $this->assertText(t('User login'), t('Blocks are shown on the default 403 page')); + + // Log back in, set the custom 403 page to /user and remove the block + $this->drupalLogin($this->admin_user); + variable_set('site_403', 'user'); + $this->drupalPost('admin/structure/block', array('user_login[region]' => '-1'), t('Save blocks')); + + // Check that we can log in from the 403 page. + $this->drupalLogout(); + $edit = array( + 'name' => $this->admin_user->name, + 'pass' => $this->admin_user->pass_raw, + ); + $this->drupalPost('admin/settings/site-information', $edit, t('Log in')); + + // Check that we're still on the same page. + $this->assertText(t('Site information')); } } |