function NodeRevisionsTest::testRevisionDelete in SimpleTest 6
Simpletest test. Tests to make sure the revision deletes properly.
File
- tests/
node_revisions.test, line 91
Class
Code
function testRevisionDelete() {
extract($this
->prepareRevisions());
$test_user = $this
->drupalCreateUserRolePerm(array(
'delete revisions',
'delete any page content',
));
$this
->drupalLoginUser($test_user);
$this
->drupalPost("node/{$node->nid}/revisions/{$vid}/delete", array(), 'Delete');
$this
->assertTrue(db_result(db_query('SELECT COUNT(vid) FROM {node_revisions} WHERE nid = %d and VID = %d', $node->nid, $vid)) == 0, 'Check to make sure revisions delete properly');
$this
->cleanup($node->nid);
$this
->cleanup($node->nid);
}