summaryrefslogtreecommitdiff
path: root/modules/system/system.test
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2010-01-18 17:08:20 +0000
committerDries Buytaert <dries@buytaert.net>2010-01-18 17:08:20 +0000
commite7b9ad7676f1aa5fe33e1910bf39f27877a3e9c7 (patch)
tree7e3d4103bc0ae4ca3902d854aa00ffaec78f96cf /modules/system/system.test
parent36e33b75d5bc991a085755444d20b510b7ff9e1d (diff)
downloadbrdo-e7b9ad7676f1aa5fe33e1910bf39f27877a3e9c7.tar.gz
brdo-e7b9ad7676f1aa5fe33e1910bf39f27877a3e9c7.tar.bz2
- Patch #678504 by heyrocker, David_Rothstein: incorrect menu argument for ip address blocking.
Diffstat (limited to 'modules/system/system.test')
-rw-r--r--modules/system/system.test7
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/system/system.test b/modules/system/system.test
index 9bdd3a5d6..cca0f6689 100644
--- a/modules/system/system.test
+++ b/modules/system/system.test
@@ -372,6 +372,13 @@ class IPAddressBlockingTestCase extends DrupalWebTestCase {
$this->drupalPost('admin/config/people/ip-blocking', $edit, t('Save'));
$this->assertText(t('Enter a valid IP address.'));
+ // Pass an IP address as a URL parameter and submit it.
+ $submit_ip = '1.2.3.4';
+ $this->drupalPost('admin/config/people/ip-blocking/' . $submit_ip, NULL, t('Save'));
+ $ip = db_query("SELECT iid from {blocked_ips} WHERE ip = :ip", array(':ip' => $submit_ip))->fetchField();
+ $this->assertTrue($ip, t('IP address found in database'));
+ $this->assertRaw(t('The IP address %ip has been blocked.', array('%ip' => $submit_ip)), t('IP address was blocked.'));
+
// Submit your own IP address. This fails, although it works when testing manually.
// TODO: on some systems this test fails due to a bug or inconsistency in cURL.
// $edit = array();