diff options
Diffstat (limited to 'modules/taxonomy/taxonomy.test')
-rw-r--r-- | modules/taxonomy/taxonomy.test | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/modules/taxonomy/taxonomy.test b/modules/taxonomy/taxonomy.test index 93e7e2997..605b6a86e 100644 --- a/modules/taxonomy/taxonomy.test +++ b/modules/taxonomy/taxonomy.test @@ -475,6 +475,19 @@ class TaxonomyTermTestCase extends TaxonomyWebTestCase { // Insert the terms in a comma separated list. Vocabulary 1 is a // free-tagging field created by the default profile. $edit[$instance['field_name'] . "[$langcode]"] = implode(', ', $terms); + + // Preview and verify the terms appear but are not created. + $this->drupalPost('node/add/page', $edit, t('Preview')); + foreach ($terms as $term) { + $this->assertText($term, t('The term appears on the node preview')); + } + $tree = taxonomy_get_tree($this->vocabulary->vid); + $this->assertTrue(empty($tree), t('The terms are not created on preview.')); + + // taxonomy.module does not maintain its static caches. + drupal_static_reset(); + + // Save, creating the terms. $this->drupalPost('node/add/page', $edit, t('Save')); $this->assertRaw(t('@type %title has been created.', array('@type' => t('Basic page'), '%title' => $edit["title"])), t('The node was created successfully')); foreach ($terms as $term) { |