person searchable by diaspora_handle

This commit is contained in:
danielvincent 2010-11-02 16:48:30 -07:00
parent 8c89f8d87a
commit e9f3efea79
2 changed files with 5 additions and 0 deletions

View file

@ -56,6 +56,7 @@ class Person
q = Regexp.escape(token.to_s.strip)
p = Person.searchable.all('profile.first_name' => /^#{q}/i) \
| Person.searchable.all('profile.last_name' => /^#{q}/i) \
| Person.searchable.all('diaspora_handle' => /^#{q}/i) \
| p
end

View file

@ -193,6 +193,10 @@ describe Person do
Person.search("johnson").should_not include invisible_person
Person.search("").should_not include invisible_person
end
it 'should search on handles' do
Person.search(@friend_one.diaspora_handle).should include @friend_one
end
end
context 'people finders for webfinger' do