Skip to content
Extraits de code Groupes Projets
Valider 5cc7aa44 rédigé par Raphael Sofaer's avatar Raphael Sofaer
Parcourir les fichiers

Change some person_ids to author_ids

parent e38a136c
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -5,10 +5,10 @@ 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
FileUtils::mkdir_p photos_dir
photos.each do |photo|
current_photo_location = "#{Rails.root}/public/uploads/images/#{photo.image_filename}"
......
......@@ -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()]
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter