Update java_deserialization_spec to rescue the right exception

GSoC/Meterpreter_Web_Console
Wei Chen 2019-01-16 10:47:52 -06:00
parent 1947bae45b
commit 0051caf6ce
1 changed files with 2 additions and 2 deletions

View File

@ -28,9 +28,9 @@ RSpec.describe Msf::Util::JavaDeserialization do
end
context 'when default payload is not JSON format' do
it 'raises a JSON::ParserError error' do
it 'raises a RuntimeError error' do
allow(File).to receive(:read).and_return('BAD DATA')
expect{Msf::Util::JavaDeserialization::ysoserial_payload(payload_name, default_command)}.to raise_error(JSON::ParserError)
expect{Msf::Util::JavaDeserialization::ysoserial_payload(payload_name, default_command)}.to raise_error(RuntimeError)
end
end