Refactor specs according to new behaviour of search method