Created
June 2, 2014 11:52
-
-
Save rachelbaker/7246459a9b3a01c8bdeb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function test_get_revisions_without_permission() { | |
$this->markTestSkipped( 'https://github.com/WP-API/WP-API/issues/251' ); | |
$user = wp_get_current_user(); | |
$user->add_cap( 'publish_posts', false ); | |
// Flush capabilities, https://core.trac.wordpress.org/ticket/28374 | |
$user->get_role_caps(); | |
$user->update_user_level_from_caps(); | |
$response = $this->endpoint->get_revisions( $this->post_id ); | |
$this->assertErrorResponse( 'json_cannot_view', $response, 403 ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment