rspec tests for search