From ac581679b00ec8baa4f9a94ad90af050de870efd Mon Sep 17 00:00:00 2001 From: Angie Byron Date: Wed, 13 Jan 2010 04:35:28 +0000 Subject: #681940 by chx: Fixed Multistep node forms cant change the basic options. (with tests) --- modules/node/node.test | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'modules/node/node.test') 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'); + } +} -- cgit v1.2.3