Change some person_ids to author_ids
This commit is contained in:
parent
e38a136c49
commit
5cc7aa4496
4 changed files with 8 additions and 8 deletions
|
|
@ -5,7 +5,7 @@ module PhotoMover
|
|||
FileUtils::mkdir_p temp_dir
|
||||
Dir.chdir 'tmp/exports'
|
||||
|
||||
photos = user.visible_posts(:person_id => user.person.id, :type => 'Photo')
|
||||
photos = user.visible_posts(:author_id => user.person.id, :type => 'Photo')
|
||||
|
||||
photos_dir = "#{user.id}/photos"
|
||||
FileUtils::mkdir_p photos_dir
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ module Diaspora
|
|||
end
|
||||
|
||||
def create_body
|
||||
@user.visible_posts(:person_id => @user.person.id, :public=>true).inject("") do |xml,curr|
|
||||
@user.visible_posts(:author_id => @user.person.id, :public=>true).inject("") do |xml,curr|
|
||||
if curr.respond_to?(:to_activity)
|
||||
unless xml
|
||||
curr.to_activity
|
||||
|
|
|
|||
|
|
@ -39,8 +39,8 @@ class PostsFake
|
|||
@model.id.to_s
|
||||
end
|
||||
|
||||
def person
|
||||
@fakes_collection.people_hash[@model.person_id]
|
||||
def author
|
||||
@fakes_collection.people_hash[@model.author_id]
|
||||
end
|
||||
|
||||
def method_missing(method, *args)
|
||||
|
|
|
|||
|
|
@ -36,10 +36,10 @@ describe PostsFake do
|
|||
@fakes = mock()
|
||||
@fake = PostsFake::Fake.new(@post, @fakes)
|
||||
end
|
||||
it 'refers to the parent collection for a person' do
|
||||
@post.should_receive(:person_id)
|
||||
it 'refers to the parent collection for an author' do
|
||||
@post.should_receive(:author_id)
|
||||
@fakes.should_receive(:people_hash).and_return({})
|
||||
@fake.person
|
||||
@fake.author
|
||||
end
|
||||
it 'refers to its comments array for comments' do
|
||||
@fake.comments = [mock()]
|
||||
|
|
|
|||
Loading…
Reference in a new issue