summaryrefslogtreecommitdiff
path: root/modules/search
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-05-25 15:43:38 +0000
committerDries Buytaert <dries@buytaert.net>2009-05-25 15:43:38 +0000
commit982c7c3cc841e6ccb85f41e7526a7de428ab91e0 (patch)
tree682cf912634aab056244163d1205cd75598db9f2 /modules/search
parentf0940b1dbf630c438bf99fb21dd62518cebfd81a (diff)
downloadbrdo-982c7c3cc841e6ccb85f41e7526a7de428ab91e0.tar.gz
brdo-982c7c3cc841e6ccb85f41e7526a7de428ab91e0.tar.bz2
- Patch #250729 by andypost, catch, R.Muilwijk et al: remove some unnecessary queries and search index.
Diffstat (limited to 'modules/search')
-rw-r--r--modules/search/search.test13
1 files changed, 13 insertions, 0 deletions
diff --git a/modules/search/search.test b/modules/search/search.test
index b7f5e9c2a..fc85653b9 100644
--- a/modules/search/search.test
+++ b/modules/search/search.test
@@ -503,5 +503,18 @@ class SearchCommentTestCase extends DrupalWebTestCase {
$this->assertText($comment_body, t('Comment body text found in search results.'));
$this->assertNoRaw(t('n/a'), t('HTML in comment body is not hidden.'));
$this->assertNoRaw(check_plain($edit_comment['comment']), t('HTML in comment body is not escaped.'));
+
+ // Hide comments.
+ $this->drupalLogin($this->admin_user);
+ $node->comment = 0;
+ node_save($node);
+
+ // Invoke search index update.
+ $this->drupalLogout();
+ $this->drupalGet($GLOBALS['base_url'] . '/cron.php', array('external' => TRUE, 'query' => 'cron_key=' . variable_get('cron_key', 'drupal')));
+
+ // Search for $title.
+ $this->drupalPost('', $edit, t('Search'));
+ $this->assertNoText($comment_body, t('Comment body text not found in search results.'));
}
}