added featured users dg iz
This commit is contained in:
parent
e42d7273a8
commit
3a6f0583c7
4 changed files with 39 additions and 37 deletions
|
|
@ -20,6 +20,7 @@
|
||||||
%br
|
%br
|
||||||
|
|
||||||
#featured_users
|
#featured_users
|
||||||
|
- unless @people.blank?
|
||||||
- @people.each do |person|
|
- @people.each do |person|
|
||||||
.user_card
|
.user_card
|
||||||
= person_image_link(person, :size => :thumb_large)
|
= person_image_link(person, :size => :thumb_large)
|
||||||
|
|
|
||||||
|
|
@ -136,6 +136,7 @@ defaults: &defaults
|
||||||
# Featured users
|
# Featured users
|
||||||
# (expressed as an array of Diaspora IDs)
|
# (expressed as an array of Diaspora IDs)
|
||||||
featured_users:
|
featured_users:
|
||||||
|
- 'diasporahq@joindiaspora.com'
|
||||||
|
|
||||||
# Use this section to override default settings in specific environments
|
# Use this section to override default settings in specific environments
|
||||||
development:
|
development:
|
||||||
|
|
|
||||||
|
|
@ -68,4 +68,28 @@ describe ContactsController do
|
||||||
save_fixture(html_for("body"), "aspects_manage")
|
save_fixture(html_for("body"), "aspects_manage")
|
||||||
end
|
end
|
||||||
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
|
end
|
||||||
|
|
|
||||||
|
|
@ -325,28 +325,4 @@ describe PeopleController do
|
||||||
get :retrieve_remote, :diaspora_handle => @user.diaspora_handle
|
get :retrieve_remote, :diaspora_handle => @user.diaspora_handle
|
||||||
end
|
end
|
||||||
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
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue