Optimize test description...

[ci skip]
This commit is contained in:
Dennis Schubert 2016-05-10 00:30:01 +02:00
parent 2ffc7e3814
commit 594529fc15

View file

@ -36,7 +36,7 @@ module DiasporaFederation
described_class.receive_public(data, true) described_class.receive_public(data, true)
end end
it "re-raises errors from receiver" do it "redirects exceptions from the receiver" do
expect { expect {
described_class.receive_public("<xml/>") described_class.receive_public("<xml/>")
}.to raise_error DiasporaFederation::Salmon::InvalidEnvelope }.to raise_error DiasporaFederation::Salmon::InvalidEnvelope
@ -87,7 +87,7 @@ module DiasporaFederation
}.to raise_error ArgumentError, "no recipient key provided" }.to raise_error ArgumentError, "no recipient key provided"
end end
it "re-raises errors from receiver" do it "redirects exceptions from the receiver" do
invalid_magic_env = Nokogiri::XML::Document.parse("<xml/>").root invalid_magic_env = Nokogiri::XML::Document.parse("<xml/>").root
data = Salmon::EncryptedMagicEnvelope.encrypt(invalid_magic_env, recipient_key.public_key) data = Salmon::EncryptedMagicEnvelope.encrypt(invalid_magic_env, recipient_key.public_key)