Skip to content

Commit 08d529b

Browse files
committed
Fix login_scanner_base rspec
1 parent 90c42b4 commit 08d529b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

spec/support/shared/examples/metasploit/framework/login_scanner/login_scanner_base.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,15 @@
172172

173173
context 'cred_details' do
174174
it 'is not valid for not set' do
175+
creds = double('Metasploit::Framework::CredentialCollection')
176+
allow(creds).to receive(:pass_file)
177+
allow(creds).to receive(:username)
178+
allow(creds).to receive(:user_file)
179+
allow(creds).to receive(:userpass_file)
180+
allow(creds).to receive(:prepended_creds).and_return([])
181+
allow(creds).to receive(:additional_privates).and_return([])
182+
allow(creds).to receive(:additional_publics).and_return([])
183+
login_scanner.cred_details = creds
175184
expect(login_scanner).to_not be_valid
176185
expect(login_scanner.errors[:cred_details]).to include "can't be blank"
177186
end

0 commit comments

Comments
 (0)