From 37f5a419b7bddd200b3d9cd31f105b054cdc64b0 Mon Sep 17 00:00:00 2001 From: Jacob Robles Date: Thu, 18 Apr 2019 05:53:23 -0500 Subject: [PATCH] Update spec with new intended cmd_creds behavior Creds behavior was changed in PR #11742 --- .../ui/console/command_dispatcher/creds_spec.rb | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) 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)