This commit is contained in:
dwelch-r7 2021-04-01 15:57:28 +01:00
parent 278c56652e
commit 98df005c6c
1 changed files with 2 additions and 2 deletions

View File

@ -57,12 +57,12 @@ RSpec.describe Metasploit::Framework::LoginScanner::MySQL do
context 'due to connection timeout' do
it 'returns a result with a status of Metasploit::Model::Login::Status::UNABLE_TO_CONNECT' do
expect(::RbMysql).to receive(:connect).and_raise RbMysql::ClientError
expect(::RbMysql).to receive(:connect).and_raise RbMysql::ClientError, "Client Error"
expect(login_scanner.attempt_login(pub_pub).status).to eq Metasploit::Model::Login::Status::UNABLE_TO_CONNECT
end
it 'returns a result with the proof containing an appropriate error message' do
expect(::RbMysql).to receive(:connect).and_raise RbMysql::ClientError
expect(::RbMysql).to receive(:connect).and_raise RbMysql::ClientError, "Client Error"
expect(login_scanner.attempt_login(pub_pub).proof).to be_a(RbMysql::ClientError)
end
end