WordPress.org

Make WordPress Core

Changeset 39043


Ignore:
Timestamp:
10/31/2016 12:27:17 AM (4 years ago)
Author:
rachelbaker
Message:

REST API: Correctly test the roles parameter when creating a user in WP_Test_REST_Users_Controller.

Props jnylen0.
Fixes #38575.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/rest-api/rest-users-controller.php

    r38990 r39043  
    662662            'nickname'    => 'testuser',
    663663            'slug'        => 'test-user',
    664             'role'        => 'editor',
     664            'roles'       => array( 'editor' ),
    665665            'description' => 'New API User',
    666666            'url'         => 'http://example.com',
     
    674674        $data = $response->get_data();
    675675        $this->assertEquals( 'http://example.com', $data['url'] );
     676        $this->assertEquals( array( 'editor' ), $data['roles'] );
    676677        $this->check_add_edit_user_response( $response );
    677678    }
Note: See TracChangeset for help on using the changeset viewer.