Index: modules/search/search.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/search/search.test,v
retrieving revision 1.35
diff -u -r1.35 search.test
--- modules/search/search.test	11 Sep 2009 15:39:48 -0000	1.35
+++ modules/search/search.test	20 Sep 2009 12:13:51 -0000
@@ -528,3 +528,38 @@
     $this->assertNoText($comment_body, t('Comment body text not found in search results.'));
   }
 }
+
+/**
+ * Test config page.
+ */
+class SearchConfigSettingsForm extends DrupalWebTestCase {
+  public static function getInfo() {
+    return array(
+      'name' => 'Config settings form',
+      'description' => 'Verify the search config settings form.',
+      'group' => 'Search',
+    );
+  }
+
+  function setUp() {
+    parent::setUp('search');
+
+    $this->admin_user = $this->drupalCreateUser(array('search content', 'administer search'));
+    $this->drupalLogin($this->admin_user);
+  }
+
+  /**
+   * Verify the search settings form.
+   */
+  function testSearchSettingsPage() {
+    // Test that the form renders.
+    $this->drupalGet('admin/config/search/settings');
+    $this->assertText(t('Indexing status'));
+
+    // Test the re-index button.
+    $this->drupalPost('admin/config/search/settings', array(), t('Re-index site'));
+    $this->assertText(t('Are you sure you want to re-index the site'));
+    $this->drupalPost('admin/config/search/settings/reindex', array(), t('Re-index site'));
+    $this->assertText(t('The index will be rebuilt'));
+  }
+}
