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