update spec for pre-check
parent
654590911b
commit
903807d039
|
@ -323,14 +323,12 @@ RSpec.describe Msf::Exploit::Powershell do
|
|||
end
|
||||
|
||||
context 'when method is unknown' do
|
||||
before do
|
||||
subject.datastore['Powershell::method'] = 'blah'
|
||||
end
|
||||
it 'should raise an exception' do
|
||||
except = false
|
||||
begin
|
||||
subject.datastore['Powershell::method'] = 'blah'
|
||||
subject.cmd_psh_payload(payload, arch)
|
||||
rescue RuntimeError
|
||||
rescue Msf::OptionValidateError
|
||||
except = true
|
||||
end
|
||||
expect(except).to be_truthy
|
||||
|
|
Loading…
Reference in New Issue