Land #11749, Update spec with new intended cmd_creds behavior
commit
54bbcc91ba
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue