summaryrefslogtreecommitdiff
path: root/modules/forum/forum.test
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2010-04-26 14:32:27 +0000
committerDries Buytaert <dries@buytaert.net>2010-04-26 14:32:27 +0000
commit9f70b717e56c8bc816dd5119e2830d668037d5cc (patch)
tree0cb7dc7ca632e90cc78d8ce65856ef6bbb74169f /modules/forum/forum.test
parent96bfc650bc1f4430654575b8872e77c90bb8d50c (diff)
downloadbrdo-9f70b717e56c8bc816dd5119e2830d668037d5cc.tar.gz
brdo-9f70b717e56c8bc816dd5119e2830d668037d5cc.tar.bz2
- Patch #613272 by Kevin Hankens, Dave Reid, yoroy, rgristroph, pcarman: forums not usable out-of-the-box: disabled comments, no forums.
Diffstat (limited to 'modules/forum/forum.test')
-rw-r--r--modules/forum/forum.test18
1 files changed, 17 insertions, 1 deletions
diff --git a/modules/forum/forum.test b/modules/forum/forum.test
index c1076fe94..2cd4909d8 100644
--- a/modules/forum/forum.test
+++ b/modules/forum/forum.test
@@ -35,6 +35,11 @@ class ForumTestCase extends DrupalWebTestCase {
* Login users, create forum nodes, and test forum functionality through the admin and user interfaces.
*/
function testForum() {
+ //Check that the basic forum install creates a default forum topic
+ $this->drupalGet("/forum");
+ // Look for the "General discussion" default forum
+ $this->assertText(t("General discussion"), "Found the default forum at the /forum listing");
+
// Do the admin tests.
$this->doAdminTests($this->admin_user);
// Generate topics to populate the active forum block.
@@ -94,11 +99,22 @@ class ForumTestCase extends DrupalWebTestCase {
* Forum nodes should not be created without choosing forum from select list.
*/
function testAddOrphanTopic() {
+ // Must remove forum topics to test creating orphan topics.
+ $vid = variable_get('forum_nav_vocabulary');
+ $tree = taxonomy_get_tree($vid);
+ foreach($tree as $term) {
+ taxonomy_term_delete($term->tid);
+ }
+
+ // Create an orphan forum item.
$this->drupalLogin($this->admin_user);
$this->drupalPost('node/add/forum', array('title' => $this->randomName(10), 'body[' . LANGUAGE_NONE .'][0][value]' => $this->randomName(120)), t('Save'));
$nid_count = db_query('SELECT COUNT(nid) FROM {node}')->fetchField();
- $this->assertEqual(0, $nid_count, t('A forum node was not created.'));
+ $this->assertEqual(0, $nid_count, t('A forum node was not created when missing a forum vocabulary.'));
+
+ // Reset the defaults for future tests.
+ module_enable(array('forum'));
}
/**