Test sending to people with bad rsa keys.
This commit is contained in:
parent
00589c10c6
commit
2f89f19f34
1 changed files with 13 additions and 0 deletions
|
|
@ -80,4 +80,17 @@ describe Job::HttpMulti do
|
|||
person.reload
|
||||
person.url.should == "https://remote.net/"
|
||||
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
|
||||
|
|
|
|||
Loading…
Reference in a new issue