tests for search with a query