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
Don't need `&block` (it's slower than not having it here) if just using `block_given?`