WordPress.org

Make WordPress Core

Changeset 1098 in tests


Ignore:
Timestamp:
10/30/12 20:57:32 (18 months ago)
Author:
westi
Message:

XMLRPC: Add a test case for #WP22320 to check the metaweblog.getRecentPosts return when the user has no posts. Props redsweater.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/xmlrpc/mw/getRecentPosts.php

    r904 r1098  
    3030    } 
    3131 
     32    /** 
     33     * @ticket 22320 
     34     */ 
     35    function test_no_editing_privileges() { 
     36        $this->make_user_by_role( 'subscriber' ); 
     37 
     38        $result = $this->myxmlrpcserver->mw_getRecentPosts( array( 1, 'subscriber', 'subscriber' ) ); 
     39        $this->assertInstanceOf( 'IXR_Error', $result ); 
     40        $this->assertEquals( 401, $result->code ); 
     41    } 
     42     
    3243    function test_no_editable_posts() { 
    3344        wp_delete_post( $this->post_id ); 
Note: See TracChangeset for help on using the changeset viewer.