Skip to content

Commit 9a42e76

Browse files
committed
Use expect instead of should on try_login
1 parent 06207af commit 9a42e76

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spec/lib/metasploit/framework/login_scanner/glassfish_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,12 @@
7676

7777
context '#try_login' do
7878
it 'sends a login request to /j_security_check' do
79-
http_scanner.should_receive(:send_request).with(hash_including('uri'=>'/j_security_check'))
79+
expect(http_scanner).to receive(:send_request).with(hash_including('uri'=>'/j_security_check'))
8080
http_scanner.try_login(cred)
8181
end
8282

8383
it 'sends a login request containing the username and password' do
84-
http_scanner.should_receive(:send_request).with(hash_including('data'=>"j_username=#{username}&j_password=#{password}&loginButton=Login"))
84+
expect(http_scanner).to receive(:send_request).with(hash_including('data'=>"j_username=#{username}&j_password=#{password}&loginButton=Login"))
8585
http_scanner.try_login(cred)
8686
end
8787
end

0 commit comments

Comments
 (0)