diff options
author | Ilyaaaaaaaaaaaaa Zhitomirskiy <ilya@joindiaspora.com> | 2011-07-30 05:58:40 +0400 |
---|---|---|
committer | Ilyaaaaaaaaaaaaa Zhitomirskiy <ilya@joindiaspora.com> | 2011-07-30 06:00:15 +0400 |
commit | 3a6f0583c7a9bc35d5574670f9567de0ed02385a (patch) | |
tree | 471852e3291b0078a64446e775f136d8704f4e06 /spec | |
parent | e42d7273a8f427020f926dba17515be91ba9d97e (diff) |
added featured users dg iz
Diffstat (limited to 'spec')
-rw-r--r-- | spec/controllers/contacts_controller_spec.rb | 24 | ||||
-rw-r--r-- | spec/controllers/people_controller_spec.rb | 24 |
2 files changed, 24 insertions, 24 deletions
diff --git a/spec/controllers/contacts_controller_spec.rb b/spec/controllers/contacts_controller_spec.rb index 929aefd1f..81a15923b 100644 --- a/spec/controllers/contacts_controller_spec.rb +++ b/spec/controllers/contacts_controller_spec.rb @@ -68,4 +68,28 @@ describe ContactsController do save_fixture(html_for("body"), "aspects_manage") end end + + describe '#featued' do + it 'succeeds' do + get :featured + response.should be_success + end + + it 'gets queries for users in the app config' do + AppConfig[:featured_users] = [alice.diaspora_handle] + + get :featured + assigns[:people].should == [alice.person] + end + + it 'fetches the webfinger profiles' do + AppConfig[:featured_users] = [alice.diaspora_handle] + + wf = mock + wf.should_receive(:fetch) + Webfinger.should_receive(:new).with(alice.diaspora_handle).and_return(wf) + + get :featured + end + end end diff --git a/spec/controllers/people_controller_spec.rb b/spec/controllers/people_controller_spec.rb index 3a0ec81fa..6b7e73735 100644 --- a/spec/controllers/people_controller_spec.rb +++ b/spec/controllers/people_controller_spec.rb @@ -325,28 +325,4 @@ describe PeopleController do get :retrieve_remote, :diaspora_handle => @user.diaspora_handle end end - - describe '#featued' do - it 'succeeds' do - get :featured - response.should be_success - end - - it 'gets queries for users in the app config' do - AppConfig[:featured_users] = [alice.diaspora_handle] - - get :featured - assigns[:people].should == [alice.person] - end - - it 'fetches the webfinger profiles' do - AppConfig[:featured_users] = [alice.diaspora_handle] - - wf = mock - wf.should_receive(:fetch) - Webfinger.should_receive(:new).with(alice.diaspora_handle).and_return(wf) - - get :featured - end - end end |