Fix inbox note deletion test cases. (https://github.com/woocommerce/woocommerce-admin/pull/4674)
Counts were incorrect.
This commit is contained in:
parent
32c99fa4ea
commit
96f06a28ec
|
@ -384,7 +384,7 @@ class WC_Tests_API_Admin_Notes extends WC_REST_Unit_Test_Case {
|
||||||
$notes = $response->get_data();
|
$notes = $response->get_data();
|
||||||
|
|
||||||
$this->assertEquals( 200, $response->get_status() );
|
$this->assertEquals( 200, $response->get_status() );
|
||||||
$this->assertEquals( 2, count( $notes ) );
|
$this->assertEquals( 4, count( $notes ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -405,7 +405,7 @@ class WC_Tests_API_Admin_Notes extends WC_REST_Unit_Test_Case {
|
||||||
|
|
||||||
$response = $this->server->dispatch( new WP_REST_Request( 'DELETE', $this->endpoint . '/delete/all' ) );
|
$response = $this->server->dispatch( new WP_REST_Request( 'DELETE', $this->endpoint . '/delete/all' ) );
|
||||||
$notes = $response->get_data();
|
$notes = $response->get_data();
|
||||||
$this->assertEquals( 2, count( $notes ) );
|
$this->assertEquals( 4, count( $notes ) );
|
||||||
|
|
||||||
$request = new WP_REST_Request( 'PUT', $this->endpoint . '/undoremove' );
|
$request = new WP_REST_Request( 'PUT', $this->endpoint . '/undoremove' );
|
||||||
$request->set_body_params(
|
$request->set_body_params(
|
||||||
|
|
Loading…
Reference in New Issue