From 11925ded2b9f1011d26cee9cdc74686e79705de5 Mon Sep 17 00:00:00 2001 From: maxwell Date: Thu, 14 Oct 2010 19:15:32 -0700 Subject: [PATCH] moving branches --- lib/diaspora/importer.rb | 4 ++-- spec/lib/importer_spec.rb | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/diaspora/importer.rb b/lib/diaspora/importer.rb index dbe15825a..e1e8ad97f 100644 --- a/lib/diaspora/importer.rb +++ b/lib/diaspora/importer.rb @@ -151,8 +151,8 @@ module Diaspora aspect = Aspect.new aspect.name = a.xpath('/aspect/name').text - aspect.post_ids = a.xpath('/aspect/post_ids/post_id').collect(&:text) - aspect.person_ids = a.xpath('/aspect/person_ids/person_id').collect(&:text) + aspect.post_ids = a.xpath('/aspect/post_ids/post_id').collect{ |x| x.text.to_id } + aspect.person_ids = a.xpath('/aspect/person_ids/person_id').collect{ |x| x.text.to_id } aspects << aspect end aspects diff --git a/spec/lib/importer_spec.rb b/spec/lib/importer_spec.rb index 00ac5730a..06d92e227 100644 --- a/spec/lib/importer_spec.rb +++ b/spec/lib/importer_spec.rb @@ -202,6 +202,8 @@ describe Diaspora::Importer do Post.count.should == 4 n.aspects.count.should == 6 Person.count.should be == 5 + + User.first.person.diaspora_handle.should == User.first.diaspora_handle Person.find_by_id( @user1.person.id ).nil?.should == false