Make WordPress Core


Ignore:
Timestamp:
12/02/2012 11:18:40 PM (14 years ago)
Author:
nacin
Message:

Test for the revision count (via XML-RPC) for posts created with an auto-draft. props maxcutler. see #WP22686, #WP22687.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/xmlrpc/wp/getRevisions.php

    r1050 r1162  
    4545                $this->assertCount( 1, $result );
    4646        }
     47
     48        /**
     49         * @ticket 22687
     50         */
     51        function test_revision_count_for_auto_draft_post_creation() {
     52                $this->make_user_by_role( 'editor' );
     53
     54                $post_id = $this->myxmlrpcserver->wp_newPost( array( 1, 'editor', 'editor', array(
     55                        'post_title' => 'Original title',
     56                        'post_content' => 'Test'
     57                ) ) );
     58
     59                $result = $this->myxmlrpcserver->wp_getRevisions( array( 1, 'editor', 'editor', $post_id ) );
     60                $this->assertCount( 0, $result );
     61        }
     62
    4763}
Note: See TracChangeset for help on using the changeset viewer.