Fix unit test

This commit is contained in:
Mike Jolley 2017-03-24 11:35:54 +00:00
parent 8b4ce8460a
commit 819448daf5
1 changed files with 17 additions and 1 deletions

View File

@ -452,7 +452,7 @@ class WC_Tests_API_Shipping_Zones extends WC_REST_Unit_Test_Case {
'type' => 'country',
),
array(
'code' => 'US', // test that locations missing "type" aren't saved
'code' => 'US', // test that locations missing "type" treated as country.
),
array(
'code' => 'SW1A0AA',
@ -483,6 +483,22 @@ class WC_Tests_API_Shipping_Zones extends WC_REST_Unit_Test_Case {
),
),
),
array(
'code' => 'US',
'type' => 'country',
'_links' => array(
'collection' => array(
array(
'href' => rest_url( '/wc/v2/shipping/zones/' . $zone->get_id() . '/locations' ),
),
),
'describes' => array(
array(
'href' => rest_url( '/wc/v2/shipping/zones/' . $zone->get_id() ),
),
),
),
),
array(
'code' => 'SW1A0AA',
'type' => 'postcode',