IZ MS tests now pass
This commit is contained in:
parent
b0455b9532
commit
283b4a40b5
2 changed files with 1 additions and 7 deletions
|
|
@ -28,7 +28,7 @@ class Retraction
|
||||||
def perform receiving_user_id
|
def perform receiving_user_id
|
||||||
Rails.logger.debug "Performing retraction for #{post_id}"
|
Rails.logger.debug "Performing retraction for #{post_id}"
|
||||||
begin
|
begin
|
||||||
return unless signature_valid?creator_signature
|
return unless signature_valid?
|
||||||
Rails.logger.debug("Retracting #{self.type} id: #{self.post_id}")
|
Rails.logger.debug("Retracting #{self.type} id: #{self.post_id}")
|
||||||
target = self.type.constantize.first(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
|
target.unsocket_from_uid receiving_user_id if target.respond_to? :unsocket_from_uid
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,6 @@ describe 'user encryption' do
|
||||||
xml = request.to_diaspora_xml
|
xml = request.to_diaspora_xml
|
||||||
person.destroy
|
person.destroy
|
||||||
personcount = Person.all.count
|
personcount = Person.all.count
|
||||||
puts xml
|
|
||||||
@user.receive xml
|
@user.receive xml
|
||||||
Person.all.count.should == personcount + 1
|
Person.all.count.should == personcount + 1
|
||||||
new_person = Person.first(:url => "http://test.url/")
|
new_person = Person.first(:url => "http://test.url/")
|
||||||
|
|
@ -70,9 +69,7 @@ describe 'user encryption' do
|
||||||
message = @user.post :status_message, :message => "hi"
|
message = @user.post :status_message, :message => "hi"
|
||||||
|
|
||||||
|
|
||||||
puts "foo"
|
|
||||||
retraction = Retraction.for(message)
|
retraction = Retraction.for(message)
|
||||||
puts retraction.inspect
|
|
||||||
retraction.verify_creator_signature.should be true
|
retraction.verify_creator_signature.should be true
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
@ -120,13 +117,10 @@ describe 'user encryption' do
|
||||||
|
|
||||||
message = @user2.post :status_message, :message => "hey"
|
message = @user2.post :status_message, :message => "hey"
|
||||||
message.creator_signature = "totally valid"
|
message.creator_signature = "totally valid"
|
||||||
puts message.inspect
|
|
||||||
message.save(:validate => false)
|
message.save(:validate => false)
|
||||||
|
|
||||||
puts message.inspect
|
|
||||||
xml = message.to_diaspora_xml
|
xml = message.to_diaspora_xml
|
||||||
message.destroy
|
message.destroy
|
||||||
puts xml
|
|
||||||
Post.count.should be 0
|
Post.count.should be 0
|
||||||
@user.receive xml
|
@user.receive xml
|
||||||
Post.count.should be 0
|
Post.count.should be 0
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue