Added test for empty result set
This commit is contained in:
parent
ee3b315eaa
commit
988618056d
|
@ -65,4 +65,12 @@ describe( 'Order Search API tests', () => {
|
||||||
expect( body ).toHaveLength( 1 );
|
expect( body ).toHaveLength( 1 );
|
||||||
expect( body[ 0 ].id ).toEqual( order.id );
|
expect( body[ 0 ].id ).toEqual( order.id );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
|
it( 'can return an empty result set when no matches were found', async () => {
|
||||||
|
const { body } = await ordersApi.listAll.orders( {
|
||||||
|
search: 'Chauncey Smith Kunde',
|
||||||
|
} );
|
||||||
|
|
||||||
|
expect( body ).toEqual( [] );
|
||||||
|
} );
|
||||||
} );
|
} );
|
||||||
|
|
Loading…
Reference in New Issue