put code for ransack search in common method

codeclimate was complaining about code duplication
just check for name for facebookLogin test