Update spec tests for Msf::Ui::Console::CommandDispatcher::Session.rb

- Fixes spec test for sessions command where session id should be
  sent as a string and not as an integer
This commit is contained in:
Gaurav Jain 2024-02-25 16:12:02 +05:30
parent 597807316e
commit 1eea790759
1 changed files with 3 additions and 3 deletions

View File

@ -66,12 +66,12 @@ RSpec.shared_examples_for 'session command dispatcher' do
allow(session).to receive(:next_session=)
end
let(:new_session_id) { 2 }
let(:new_session_id) { '2' }
it 'backgrounds the session and switches to the new session' do
subject.cmd_sessions(new_session_id)
subject.cmd_sessions('-i', new_session_id)
expect(session).to have_received(:interacting=).with(false)
expect(session).to have_received(:next_session=).with(new_session_id)
expect(session).to have_received(:next_session=).with(new_session_id.to_i)
end
end
end