Tests: Remove a couple of invalid error assertions.

A couple of REST API tests had an assertion `assertNotInstanceOf( 'WP_Error', $response );` which will never be true.

Since these assertions are invalid, and also made redundant by the response status check, we can just remove them.

Props dlh.
Fixes #40270.


git-svn-id: https://develop.svn.wordpress.org/trunk@40350 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
James Nylen 2017-03-29 17:05:41 +00:00
parent b9de0d7f10
commit c7f1aeb441
1 changed files with 0 additions and 2 deletions

View File

@ -2835,7 +2835,6 @@ class WP_Test_REST_Posts_Controller extends WP_Test_REST_Post_Type_Controller_Te
$request->set_param( 'force', 'false' );
$response = $this->server->dispatch( $request );
$this->assertNotInstanceOf( 'WP_Error', $response );
$this->assertEquals( 200, $response->get_status() );
$data = $response->get_data();
$this->assertEquals( 'Deleted post', $data['title']['raw'] );
@ -2850,7 +2849,6 @@ class WP_Test_REST_Posts_Controller extends WP_Test_REST_Post_Type_Controller_Te
$request['force'] = true;
$response = $this->server->dispatch( $request );
$this->assertNotInstanceOf( 'WP_Error', $response );
$this->assertEquals( 200, $response->get_status() );
$data = $response->get_data();
$this->assertTrue( $data['deleted'] );