Orders V2 API: Add test for parent_name

This commit is contained in:
Shiki 2020-10-22 15:57:05 -06:00 committed by Claudio Sanches
parent 94ecfcab34
commit ba3e107cb8
1 changed files with 2 additions and 1 deletions

View File

@ -785,9 +785,10 @@ class WC_Tests_API_Orders_V2 extends WC_REST_Unit_Test_Case {
$data = $response->get_data();
$line_item_properties = $data['schema']['properties']['line_items']['items']['properties'];
$this->assertEquals( 14, count( $line_item_properties ) );
$this->assertEquals( 15, count( $line_item_properties ) );
$this->assertArrayHasKey( 'id', $line_item_properties );
$this->assertArrayHasKey( 'meta_data', $line_item_properties );
$this->assertArrayHasKey( 'parent_name', $line_item_properties );
$meta_data_item_properties = $line_item_properties['meta_data']['items']['properties'];
$this->assertEquals( 5, count( $meta_data_item_properties ) );