summaryrefslogtreecommitdiff
path: root/modules/taxonomy/taxonomy.test
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2009-01-28 01:09:58 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2009-01-28 01:09:58 +0000
commit585aa50e6a2d7d8f67f8116c207a342c47728dfb (patch)
treeea090bf3b003a314237e5cef4d94124bcaa42a46 /modules/taxonomy/taxonomy.test
parentf5a4f24b5e02c82f67d90116356f83a542f5b99f (diff)
downloadbrdo-585aa50e6a2d7d8f67f8116c207a342c47728dfb.tar.gz
brdo-585aa50e6a2d7d8f67f8116c207a342c47728dfb.tar.bz2
#346156 by stBorchert, swentel, and catch: Fix deletion of terms (with tests).
Diffstat (limited to 'modules/taxonomy/taxonomy.test')
-rw-r--r--modules/taxonomy/taxonomy.test12
1 files changed, 10 insertions, 2 deletions
diff --git a/modules/taxonomy/taxonomy.test b/modules/taxonomy/taxonomy.test
index 0047e36ab..b4ab8880c 100644
--- a/modules/taxonomy/taxonomy.test
+++ b/modules/taxonomy/taxonomy.test
@@ -390,9 +390,9 @@ class TaxonomyTermTestCase extends TaxonomyWebTestCase {
}
/**
- * Save and edit a term and assert that the name and description are correct.
+ * Save, edit and delete a term using the user interface.
*/
- function testTermEdit() {
+ function testTermInterface() {
$edit = array(
'name' => $this->randomName(12),
'description' => $this->randomName(100),
@@ -431,6 +431,14 @@ class TaxonomyTermTestCase extends TaxonomyWebTestCase {
$this->drupalGet('taxonomy/term/' . $term[0]->tid);
$this->assertText($edit['name'], t('The randomly generated term name is present.'));
$this->assertText($edit['description'], t('The randomly generated term description is present.'));
+
+ // Delete the term.
+ $this->drupalPost('taxonomy/term/' . $term[0]->tid . '/edit', array(), t('Delete'));
+ $this->drupalPost(NULL, NULL, t('Delete'));
+
+ // Assert that the term no longer exists.
+ $this->drupalGet('taxonomy/term/' . $term[0]->tid);
+ $this->assertResponse(404, t('The taxonomy term page was not found'));
}
}