diff options
author | Dries Buytaert <dries@buytaert.net> | 2009-04-15 13:28:08 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2009-04-15 13:28:08 +0000 |
commit | dfff6528ff1aefb054d42a925293751a43c43ff2 (patch) | |
tree | feed6a2a17ad4ac21df700a5ec14577fcf594e60 /modules/node/node.test | |
parent | 852b762231d1280490962951c6c959c1752d8cc0 (diff) | |
download | brdo-dfff6528ff1aefb054d42a925293751a43c43ff2.tar.gz brdo-dfff6528ff1aefb054d42a925293751a43c43ff2.tar.bz2 |
- Patch #385602 by Damien Tournoud, desbeers, Gabor Hojtsy: log message sometimes lost on node preview. With a test\!
Diffstat (limited to 'modules/node/node.test')
-rw-r--r-- | modules/node/node.test | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/modules/node/node.test b/modules/node/node.test index 60798b01b..d73cb44d4 100644 --- a/modules/node/node.test +++ b/modules/node/node.test @@ -400,6 +400,33 @@ class PagePreviewTestCase extends DrupalWebTestCase { $this->assertFieldByName('title', $edit['title'], t('Title field displayed.')); $this->assertFieldByName('body', '<!--break-->' . $edit['body'], t('Body field displayed.')); } + + /** + * Check the node preview functionality, when using revisions. + */ + function testPagePreviewWithRevisions() { + // Force revision on page content. + variable_set('node_options_page', array('status', 'revision')); + + // Fill in node creation form and preview node. + $edit = array(); + $edit['title'] = $this->randomName(8); + $edit['body'] = $this->randomName(16); + $edit['log'] = $this->randomName(32); + $this->drupalPost('node/add/page', $edit, t('Preview')); + + // Check that the preview is displaying the title and body. + $this->assertTitle(t('Preview | Drupal'), t('Page title is preview.')); + $this->assertText($edit['title'], t('Title displayed.')); + $this->assertText($edit['body'], t('Body displayed.')); + + // Check that the title and body fields are displayed with the correct values. + $this->assertFieldByName('title', $edit['title'], t('Title field displayed.')); + $this->assertFieldByName('body', '<!--break-->' . $edit['body'], t('Body field displayed.')); + + // Check that the log field has the correct value. + $this->assertFieldByName('log', $edit['log'], t('Log field displayed.')); + } } class PageCreationTestCase extends DrupalWebTestCase { |