Add spec for full name searching

This commit is contained in:
Raphael 2010-10-11 10:46:40 -07:00
parent 978643be97
commit bd6a8a85e2

View file

@ -115,7 +115,7 @@ describe Person do
end
end
describe 'searching' do
describe '::search' do
before do
@friend_one = Factory.create(:person)
@friend_two = Factory.create(:person)
@ -159,6 +159,12 @@ describe Person do
people.include?(@friend_three).should == false
end
it 'should yield results on full names' do
pending "Not yet implemented."
people = Person.search("Casey Grippi")
people.should == [@friend_four]
end
it 'should search by diaspora_handle exactly' do
stub_success("tom@tom.joindiaspora.com")
Person.by_webfinger(@friend_one.diaspora_handle).should == @friend_one