From eeb7b53ef6c2098a0e428f98dd578eaa78a1ed89 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Tue, 20 Oct 2009 00:28:16 +0000 Subject: - Patch #601938 by mfb: fixed some forum exceptions and added tests. --- modules/forum/forum.install | 4 +--- modules/forum/forum.test | 7 +++++++ 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'modules') diff --git a/modules/forum/forum.install b/modules/forum/forum.install index 1f4c72ba2..a11795ea1 100644 --- a/modules/forum/forum.install +++ b/modules/forum/forum.install @@ -254,9 +254,7 @@ function forum_update_7001() { 'taxonomy_term_data' => 'tid', ), ); - db_create_table($ret, 'forum_index', $forum_index); + db_create_table('forum_index', $forum_index); db_query('INSERT INTO {forum_index} (SELECT n.nid, n.title, f.tid, n.sticky, n.created, ncs.last_comment_timestamp, ncs.comment_count FROM {node} n INNER JOIN {forum} f on n.vid = f.vid INNER JOIN {node_comment_statistics} ncs ON n.nid = ncs.nid)'); - - return $ret; } diff --git a/modules/forum/forum.test b/modules/forum/forum.test index 28995361f..5bf8501cc 100644 --- a/modules/forum/forum.test +++ b/modules/forum/forum.test @@ -68,6 +68,13 @@ class ForumTestCase extends DrupalWebTestCase { $this->drupalGet('forum'); $this->assertRaw("\n 6 "); $this->assertRaw('6'); + + // Test loading multiple forum nodes on the front page. + $this->drupalLogin($this->drupalCreateUser(array('administer content types', 'create forum content'))); + $this->drupalPost('admin/structure/types/manage/forum', array('node_options[promote]' => 'promote'), t('Save content type')); + $this->createForumTopic($this->forum, FALSE); + $this->createForumTopic($this->forum, FALSE); + $this->drupalGet('node'); } /** -- cgit v1.2.3