diff --git a/spec/lib/msf/ui/console/command_dispatcher/creds_spec.rb b/spec/lib/msf/ui/console/command_dispatcher/creds_spec.rb index f60986ca74..58d241b2b6 100644 --- a/spec/lib/msf/ui/console/command_dispatcher/creds_spec.rb +++ b/spec/lib/msf/ui/console/command_dispatcher/creds_spec.rb @@ -79,9 +79,9 @@ RSpec.describe Msf::Ui::Console::CommandDispatcher::Creds do ]) end - it 'should match a regular expression' do + it 'should not match a regular expression' do creds.cmd_creds('-u', "^#{username}$") - expect(@output).to eq([ + expect(@output).to_not eq([ 'Credentials', '===========', '', @@ -91,17 +91,6 @@ RSpec.describe Msf::Ui::Console::CommandDispatcher::Creds do ]) end - it 'should return nothing for a non-matching regular expression' do - creds.cmd_creds('-u', "^#{nomatch_username}$") - expect(@output).to eq([ - 'Credentials', - '===========', - '', - 'host origin service public private realm private_type JtR Format', - '---- ------ ------- ------ ------- ----- ------------ ----------' - ]) - end - context 'and when the username is blank' do it 'should show a user that matches the given expression' do creds.cmd_creds('-u', blank_username)