diff options
author | Dries Buytaert <dries@buytaert.net> | 2009-10-20 00:28:16 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2009-10-20 00:28:16 +0000 |
commit | eeb7b53ef6c2098a0e428f98dd578eaa78a1ed89 (patch) | |
tree | 00f073f3affe4fb1f1877ccaf2d9de027da860a7 /modules | |
parent | 07eee25abec9846b0f181ab07514a7b4e56020ac (diff) | |
download | brdo-eeb7b53ef6c2098a0e428f98dd578eaa78a1ed89.tar.gz brdo-eeb7b53ef6c2098a0e428f98dd578eaa78a1ed89.tar.bz2 |
- Patch #601938 by mfb: fixed some forum exceptions and added tests.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/forum/forum.install | 4 | ||||
-rw-r--r-- | modules/forum/forum.test | 7 |
2 files changed, 8 insertions, 3 deletions
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("<td class=\"topics\">\n 6 </td>"); $this->assertRaw('<td class="posts">6</td>'); + + // 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'); } /** |