Skip to content
Extraits de code Groupes Projets
Valider 2f89f19f rédigé par Ryan Hughes's avatar Ryan Hughes Validation de root
Parcourir les fichiers

Test sending to people with bad rsa keys.

parent 00589c10
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -80,4 +80,17 @@ describe Job::HttpMulti do ...@@ -80,4 +80,17 @@ describe Job::HttpMulti do
person.reload person.reload
person.url.should == "https://remote.net/" person.url.should == "https://remote.net/"
end end
it 'only sends to users with valid RSA keys' do
person = @people[0]
person.serialized_public_key = "-----BEGIN RSA PUBLIC KEY-----\nPsych!\n-----END RSA PUBLIC KEY-----"
person.save
@hydra.stub(:post, @people[0].receive_url).and_return(@response)
@hydra.stub(:post, @people[1].receive_url).and_return(@response)
Typhoeus::Hydra.stub!(:new).and_return(@hydra)
@hydra.should_receive(:queue).once
Job::HttpMulti.perform(bob.id, @post_xml, [@people[0].id, @people[1].id])
end
end end
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