Add test case for stock status parameter.
This commit is contained in:
parent
5d2b908b7d
commit
57e202d313
|
@ -875,7 +875,7 @@ const createSampleSimpleProducts = async ( categories, attributes ) => {
|
|||
grouped_products: [],
|
||||
menu_order: 0,
|
||||
related_ids: [ 67, 76, 56, 66 ],
|
||||
stock_status: 'instock'
|
||||
stock_status: 'onbackorder'
|
||||
},
|
||||
{
|
||||
name: 'Hoodie with Logo',
|
||||
|
|
|
@ -418,5 +418,14 @@ const { getRequest } = require( '../../utils/request' );
|
|||
expect( result.body ).toHaveLength( 1 );
|
||||
expect( result.body[0].name ).toBe( 'Sunglasses' );
|
||||
} );
|
||||
|
||||
it( 'stock status', async () => {
|
||||
const result = await productsApi.listAll.products( {
|
||||
stock_status: 'onbackorder',
|
||||
} );
|
||||
expect( result.statusCode ).toEqual( 200 );
|
||||
expect( result.body ).toHaveLength( 1 );
|
||||
expect( result.body[0].name ).toBe( 'T-Shirt' );
|
||||
} );
|
||||
} );
|
||||
} );
|
||||
|
|
Loading…
Reference in New Issue