summaryrefslogtreecommitdiff
path: root/modules/node/node.test
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2010-01-13 04:35:28 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2010-01-13 04:35:28 +0000
commitac581679b00ec8baa4f9a94ad90af050de870efd (patch)
tree2d341b93e79bda8938d30e0d38673f90b99c28c2 /modules/node/node.test
parent90b08f2bd880e036d16186925c9f11b3629a37a0 (diff)
downloadbrdo-ac581679b00ec8baa4f9a94ad90af050de870efd.tar.gz
brdo-ac581679b00ec8baa4f9a94ad90af050de870efd.tar.bz2
#681940 by chx: Fixed Multistep node forms cant change the basic options. (with tests)
Diffstat (limited to 'modules/node/node.test')
-rw-r--r--modules/node/node.test36
1 files changed, 36 insertions, 0 deletions
diff --git a/modules/node/node.test b/modules/node/node.test
index 4cd0a4859..c9f4fbd76 100644
--- a/modules/node/node.test
+++ b/modules/node/node.test
@@ -1276,3 +1276,39 @@ class NodeBlockFunctionalTest extends DrupalWebTestCase {
$this->assertText($node4->title, t('Node found in block.'));
}
}
+/**
+ * Test multistep node forms basic options.
+ */
+class MultiStepNodeFormBasicOptionsTest extends DrupalWebTestCase {
+ public static function getInfo() {
+ return array(
+ 'name' => 'Multistep node form basic options',
+ 'description' => 'Test the persistence of basic options through multiple steps.',
+ 'group' => 'Node',
+ );
+ }
+
+ function setUp() {
+ parent::setUp('poll');
+ $web_user = $this->drupalCreateUser(array('administer nodes', 'create poll content'));
+ $this->drupalLogin($web_user);
+ }
+
+ /**
+ * Change the default values of basic options to ensure they persist.
+ */
+ function testMultiStepNodeFormBasicOptions() {
+ $edit = array(
+ 'title' => 'a',
+ 'status' => FALSE,
+ 'promote' => FALSE,
+ 'sticky' => 1,
+ 'choice[new:0][chtext]' => 'a',
+ 'choice[new:1][chtext]' => 'a',
+ );
+ $this->drupalPost('node/add/poll', $edit, t('More choices'));
+ $this->assertNoFieldChecked('edit-status', 'status stayed unchecked');
+ $this->assertNoFieldChecked('edit-promote', 'promote stayed unchecked');
+ $this->assertFieldChecked('edit-sticky', 'sticky stayed checked');
+ }
+}