Index: modules/node/node.test =================================================================== RCS file: /cvs/drupal/drupal/modules/node/node.test,v retrieving revision 1.5 diff -u -p -r1.5 node.test --- modules/node/node.test 30 Aug 2008 13:08:05 -0000 1.5 +++ modules/node/node.test 3 Sep 2008 17:31:10 -0000 @@ -91,6 +91,29 @@ class NodeRevisionsTestCase extends Drup '@type' => 'Page', '%title' => $nodes[1]->title)), t('Revision deleted.')); $this->assertTrue(db_result(db_query('SELECT COUNT(vid) FROM {node_revisions} WHERE nid = %d and vid = %d', $node->nid, $nodes[1]->vid)) == 0, t('Revision not found.')); } + + /** + * Regression test for #261258. + * + * Checks that it is possible to create a revision without all fields being set. + */ + function testPartialNodeRevision() { + $node = $this->drupalCreateNode(); + $this->drupalGet('node/' . $node->nid); + $this->assertText($node->title, t('Found old title')); + + $updated_node = (object) array( + 'nid' => $node->nid, + 'vid' => $node->vid, + 'uid' => $node->uid, + 'type' => $node->type, + 'title' => $this->randomName(10), + 'revision' => 1 + ); + node_save($updated_node); + $this->drupalGet('node/' . $node->nid); + $this->assertText($updated_node->title, t('Found new title')); + } }