Land #11749, Update spec with new intended cmd_creds behavior

master
Brent Cook 2019-04-18 07:27:35 -05:00
commit 54bbcc91ba
No known key found for this signature in database
GPG Key ID: 1FFAA0B24B708F96
1 changed files with 2 additions and 13 deletions

View File

@ -79,9 +79,9 @@ RSpec.describe Msf::Ui::Console::CommandDispatcher::Creds do
]) ])
end end
it 'should match a regular expression' do it 'should not match a regular expression' do
creds.cmd_creds('-u', "^#{username}$") creds.cmd_creds('-u', "^#{username}$")
expect(@output).to eq([ expect(@output).to_not eq([
'Credentials', 'Credentials',
'===========', '===========',
'', '',
@ -91,17 +91,6 @@ RSpec.describe Msf::Ui::Console::CommandDispatcher::Creds do
]) ])
end 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 context 'and when the username is blank' do
it 'should show a user that matches the given expression' do it 'should show a user that matches the given expression' do
creds.cmd_creds('-u', blank_username) creds.cmd_creds('-u', blank_username)