IZ MS tests now pass

This commit is contained in:
ilya 2010-08-11 17:51:46 -07:00
parent b0455b9532
commit 283b4a40b5
2 changed files with 1 additions and 7 deletions

View file

@ -28,7 +28,7 @@ class Retraction
def perform receiving_user_id
Rails.logger.debug "Performing retraction for #{post_id}"
begin
return unless signature_valid?creator_signature
return unless signature_valid?
Rails.logger.debug("Retracting #{self.type} id: #{self.post_id}")
target = self.type.constantize.first(self.post_id)
target.unsocket_from_uid receiving_user_id if target.respond_to? :unsocket_from_uid

View file

@ -48,7 +48,6 @@ describe 'user encryption' do
xml = request.to_diaspora_xml
person.destroy
personcount = Person.all.count
puts xml
@user.receive xml
Person.all.count.should == personcount + 1
new_person = Person.first(:url => "http://test.url/")
@ -70,9 +69,7 @@ describe 'user encryption' do
message = @user.post :status_message, :message => "hi"
puts "foo"
retraction = Retraction.for(message)
puts retraction.inspect
retraction.verify_creator_signature.should be true
end
@ -120,13 +117,10 @@ describe 'user encryption' do
message = @user2.post :status_message, :message => "hey"
message.creator_signature = "totally valid"
puts message.inspect
message.save(:validate => false)
puts message.inspect
xml = message.to_diaspora_xml
message.destroy
puts xml
Post.count.should be 0
@user.receive xml
Post.count.should be 0