Update spec with new intended cmd_creds behavior

Creds behavior was changed in PR #11742
master
Jacob Robles 2019-04-18 05:53:23 -05:00
parent 56995eaa5e
commit 37f5a419b7
No known key found for this signature in database
GPG Key ID: 3EC9F18F2B12401C
1 changed files with 2 additions and 13 deletions

View File

@ -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)