- Timestamp:
- 01/31/2021 07:02:30 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/rest-api/rest-application-passwords-controller.php
r50065 r50114 191 191 192 192 $response = rest_do_request( sprintf( '/wp/v2/users/%d/application-passwords', self::$admin ) ); 193 $this->assertErrorResponse( 'rest_cannot_ manage_application_passwords', $response, 403 );193 $this->assertErrorResponse( 'rest_cannot_list_application_passwords', $response, 403 ); 194 194 } 195 195 … … 273 273 $uuid = $item['uuid']; 274 274 $response = rest_do_request( sprintf( '/wp/v2/users/%d/application-passwords/%s', self::$admin, $uuid ) ); 275 $this->assertErrorResponse( 'rest_cannot_ manage_application_passwords', $response, 403 );275 $this->assertErrorResponse( 'rest_cannot_read_application_password', $response, 403 ); 276 276 } 277 277 … … 395 395 $request->set_body_params( array( 'name' => 'App' ) ); 396 396 $response = rest_do_request( $request ); 397 $this->assertErrorResponse( 'rest_cannot_ manage_application_passwords', $response, 403 );397 $this->assertErrorResponse( 'rest_cannot_create_application_passwords', $response, 403 ); 398 398 } 399 399 … … 501 501 $request->set_body_params( array( 'name' => 'New App' ) ); 502 502 $response = rest_do_request( $request ); 503 $this->assertErrorResponse( 'rest_cannot_ manage_application_passwords', $response, 403 );503 $this->assertErrorResponse( 'rest_cannot_edit_application_password', $response, 403 ); 504 504 } 505 505 … … 644 644 $request = new WP_REST_Request( 'DELETE', sprintf( '/wp/v2/users/%d/application-passwords/%s', self::$admin, $uuid ) ); 645 645 $response = rest_do_request( $request ); 646 $this->assertErrorResponse( 'rest_cannot_ manage_application_passwords', $response, 403 );646 $this->assertErrorResponse( 'rest_cannot_delete_application_password', $response, 403 ); 647 647 } 648 648 … … 748 748 $request = new WP_REST_Request( 'DELETE', sprintf( '/wp/v2/users/%d/application-passwords', self::$admin ) ); 749 749 $response = rest_do_request( $request ); 750 $this->assertErrorResponse( 'rest_cannot_ manage_application_passwords', $response, 403 );750 $this->assertErrorResponse( 'rest_cannot_delete_application_passwords', $response, 403 ); 751 751 } 752 752
Note: See TracChangeset
for help on using the changeset viewer.