write spec for search controller. add method to authenticate user with devise test helpers.