Browse Source

Update spec with new intended cmd_creds behavior

Creds behavior was changed in PR #11742
Jacob Robles 2 months ago
parent
commit
37f5a419b7
No account linked to committer's email address
1 changed files with 2 additions and 13 deletions
  1. 2
    13
      spec/lib/msf/ui/console/command_dispatcher/creds_spec.rb

+ 2
- 13
spec/lib/msf/ui/console/command_dispatcher/creds_spec.rb View File

@@ -79,9 +79,9 @@ RSpec.describe Msf::Ui::Console::CommandDispatcher::Creds do
79 79
             ])
80 80
           end
81 81
 
82
-          it 'should match a regular expression' do
82
+          it 'should not match a regular expression' do
83 83
             creds.cmd_creds('-u', "^#{username}$")
84
-            expect(@output).to eq([
84
+            expect(@output).to_not eq([
85 85
               'Credentials',
86 86
               '===========',
87 87
               '',
@@ -91,17 +91,6 @@ RSpec.describe Msf::Ui::Console::CommandDispatcher::Creds do
91 91
             ])
92 92
           end
93 93
 
94
-          it 'should return nothing for a non-matching regular expression' do
95
-            creds.cmd_creds('-u', "^#{nomatch_username}$")
96
-            expect(@output).to eq([
97
-              'Credentials',
98
-              '===========',
99
-              '',
100
-              'host  origin  service  public  private  realm  private_type  JtR Format',
101
-              '----  ------  -------  ------  -------  -----  ------------  ----------'
102
-            ])
103
-          end
104
-
105 94
           context 'and when the username is blank' do
106 95
             it 'should show a user that matches the given expression' do
107 96
               creds.cmd_creds('-u', blank_username)

Loading…
Cancel
Save