File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
spec/support/shared/examples/metasploit/framework/login_scanner Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 172
172
173
173
context 'cred_details' do
174
174
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
175
184
expect ( login_scanner ) . to_not be_valid
176
185
expect ( login_scanner . errors [ :cred_details ] ) . to include "can't be blank"
177
186
end
You can’t perform that action at this time.
0 commit comments