dry up search tests

just a refactor