merge complete

This commit is contained in:
maxwell 2010-07-11 00:01:20 -07:00
commit 8e752209bb
3 changed files with 11 additions and 5 deletions

View file

@ -4,14 +4,15 @@ class Person
xml_accessor :email
xml_accessor :url
xml_accessor :profile, :as => Profile
xml_accessor :_id
xml_accessor :key_fingerprint
xml_accessor :profile, :as => Profile
key :email, String
key :url, String
key :active, Boolean, :default => false
key :key_fingerprint, String, :default => ""
key :key_fingerprint, String
one :profile, :class_name => 'Profile', :foreign_key => :person_id
many :posts, :class_name => 'Post', :foreign_key => :person_id

Binary file not shown.

View file

@ -37,17 +37,22 @@ describe 'user encryption' do
it 'should receive and marshal a public key from a request' do
person = Factory.build(:person, :url => "http://test.url/" )
person.key_fingerprint.nil?.should== false
#should move this to friend request, but i found it here
f = person.key_fingerprint
id = person.id
original_key = person.export_key
request = Request.instantiate(:to =>"http://www.google.com/", :from => person)
xml = Request.build_xml_for [request]
puts xml
person.destroy
store_objects_from_xml(xml)
Person.all.count.should == 2
new_person = Person.first(:url => "http://test.url/")
new_person.key_fingerprint.nil?.should == false
new_person.id.should == id
new_person.key_fingerprint.should == f
new_person.export_key.should == original_key
end
end