diff --git a/spec/lib/msf/base/sessions/mssql_spec.rb b/spec/lib/msf/base/sessions/mssql_spec.rb index 3797813c3557..4fc8344c5798 100644 --- a/spec/lib/msf/base/sessions/mssql_spec.rb +++ b/spec/lib/msf/base/sessions/mssql_spec.rb @@ -31,7 +31,7 @@ allow(user_input).to receive(:intrinsic_shell?).and_return(true) allow(user_input).to receive(:output=) allow(client).to receive(:sock).and_return(rstream) - allow(client).to receive(:mssql_query).and_return(query_result) + allow(client).to receive(:mssql_query).with('SELECT DB_NAME();').and_return(query_result) allow(rstream).to receive(:peerinfo).and_return(peer_info) end diff --git a/spec/lib/rex/post/mssql/ui/console/command_dispatcher/core_spec.rb b/spec/lib/rex/post/mssql/ui/console/command_dispatcher/core_spec.rb index d0a02488a781..d16b8ab3a7b5 100644 --- a/spec/lib/rex/post/mssql/ui/console/command_dispatcher/core_spec.rb +++ b/spec/lib/rex/post/mssql/ui/console/command_dispatcher/core_spec.rb @@ -21,7 +21,7 @@ before(:each) do allow(client).to receive(:sock).and_return(rstream) - allow(client).to receive(:mssql_query).and_return(query_result) + allow(client).to receive(:mssql_query).with('SELECT DB_NAME();').and_return(query_result) allow(rstream).to receive(:peerinfo).and_return(peer_info) allow(session).to receive(:client).and_return(client) allow(session).to receive(:console).and_return(console)