Skip to content

Commit

Permalink
Fix unit tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
spacedmonkey committed Feb 27, 2020
1 parent 6d1ece7 commit b807355
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/phpunit/integration/php/TestRestController.php
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ public function test_get_import() {
*/
public function test_get_item_auth() {
wp_set_current_user( self::$subscriber_id );
$request = new WP_REST_Request( 'GET', RestController::get_route( '/uRuPYB0P8to' ) );
$request = new WP_REST_Request( 'GET', self::get_route( '/uRuPYB0P8to' ) );
$response = rest_get_server()->dispatch( $request );
$this->assertErrorResponse( 'rest_forbidden', $response, 403 );
}
Expand All @@ -242,7 +242,7 @@ public function test_get_item_auth() {
*/
public function test_get_items_auth() {
wp_set_current_user( self::$subscriber_id );
$request = new WP_REST_Request( 'GET', RestController::get_route() );
$request = new WP_REST_Request( 'GET', self::get_route() );
$response = rest_get_server()->dispatch( $request );
$this->assertErrorResponse( 'rest_forbidden', $response, 403 );
}
Expand All @@ -255,7 +255,7 @@ public function test_get_items_auth() {
*/
public function test_get_import_auth() {
wp_set_current_user( self::$subscriber_id );
$request = new WP_REST_Request( 'GET', RestController::get_route( '/import/uRuPYB0P8to' ) );
$request = new WP_REST_Request( 'GET', self::get_route( '/import/uRuPYB0P8to' ) );
$response = rest_get_server()->dispatch( $request );
$this->assertErrorResponse( 'rest_cannot_create', $response, 403 );
}
Expand Down

0 comments on commit b807355

Please sign in to comment.