From e7b9ad7676f1aa5fe33e1910bf39f27877a3e9c7 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Mon, 18 Jan 2010 17:08:20 +0000 Subject: - Patch #678504 by heyrocker, David_Rothstein: incorrect menu argument for ip address blocking. --- modules/system/system.test | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'modules/system/system.test') 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(); -- cgit v1.2.3