add test for #search_field when called with onsearch option

search_field helper had no test for the onsearch option, an indeed it was not working, this pr fix this