tests for the search endpoint