since there is only one person with that name in the db, it returns a redirect
This commit is contained in:
parent
5e8606169d
commit
3f737116d6
1 changed files with 2 additions and 4 deletions
|
|
@ -28,18 +28,16 @@ describe PeopleController do
|
||||||
it 'shows a contact' do
|
it 'shows a contact' do
|
||||||
user2 = make_user
|
user2 = make_user
|
||||||
connect_users(user, aspect, user2, user2.aspects.create(:name => 'Neuroscience'))
|
connect_users(user, aspect, user2, user2.aspects.create(:name => 'Neuroscience'))
|
||||||
get :index
|
get :index, :q => user2.person.profile.first_name.to_s
|
||||||
assigns[:people].should include user2.person
|
assigns[:people].should include user2.person
|
||||||
response.should be_success
|
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'shows a non-contact' do
|
it 'shows a non-contact' do
|
||||||
user2 = make_user
|
user2 = make_user
|
||||||
user2.person.profile.searchable = true
|
user2.person.profile.searchable = true
|
||||||
user2.save
|
user2.save
|
||||||
get :index
|
get :index, :q => user2.person.profile.first_name.to_s
|
||||||
assigns[:people].should include user2.person
|
assigns[:people].should include user2.person
|
||||||
response.should be_success
|
|
||||||
end
|
end
|
||||||
|
|
||||||
it "redirects to person page if there is exactly one match" do
|
it "redirects to person page if there is exactly one match" do
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue