- Timestamp:
- 01/01/2018 02:30:39 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/rest-api/rest-posts-controller.php
r42343 r42423 1328 1328 } 1329 1329 1330 public function test_get_post_ without_permission() {1330 public function test_get_post_draft_status_not_authenicated() { 1331 1331 $draft_id = $this->factory->post->create( 1332 1332 array( … … 1339 1339 $response = $this->server->dispatch( $request ); 1340 1340 1341 $this->assertErrorResponse( 'rest_forbidden', $response, 40 3);1341 $this->assertErrorResponse( 'rest_forbidden', $response, 401 ); 1342 1342 } 1343 1343 … … 1465 1465 } 1466 1466 1467 public function test_get_item_read_permission_custom_post_status () {1467 public function test_get_item_read_permission_custom_post_status_not_authenticated() { 1468 1468 register_post_status( 'testpubstatus', array( 'public' => true ) ); 1469 1469 register_post_status( 'testprivtatus', array( 'public' => false ) ); … … 1487 1487 $request = new WP_REST_Request( 'GET', sprintf( '/wp/v2/posts/%d', self::$post_id ) ); 1488 1488 $response = $this->server->dispatch( $request ); 1489 $this->assertEquals( 40 3, $response->get_status() );1489 $this->assertEquals( 401, $response->get_status() ); 1490 1490 } 1491 1491
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)