Skip to content

Commit 63c3832

Browse files
author
Tod Beardsley
committed
Also test for nonmatching passwords
1 parent 1410477 commit 63c3832

File tree

1 file changed

+23
-9
lines changed
  • spec/lib/msf/ui/console/command_dispatcher

1 file changed

+23
-9
lines changed

spec/lib/msf/ui/console/command_dispatcher/db_spec.rb

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -141,15 +141,29 @@
141141
end
142142
end
143143
context "when the credential is absent" do
144-
it "should return a blank set" do
145-
db.cmd_creds("-u", nomatch_username)
146-
@output.should =~ [
147-
"===========",
148-
"Credentials",
149-
"",
150-
"---- ------- ------ ------- ----- ------------",
151-
"host service public private realm private_type"
152-
]
144+
context "due to a nonmatching username" do
145+
it "should return a blank set" do
146+
db.cmd_creds("-u", nomatch_username)
147+
@output.should =~ [
148+
"===========",
149+
"Credentials",
150+
"",
151+
"---- ------- ------ ------- ----- ------------",
152+
"host service public private realm private_type"
153+
]
154+
end
155+
end
156+
context "due to a nonmatching password" do
157+
it "should return a blank set" do
158+
db.cmd_creds("-P", nomatch_password)
159+
@output.should =~ [
160+
"===========",
161+
"Credentials",
162+
"",
163+
"---- ------- ------ ------- ----- ------------",
164+
"host service public private realm private_type"
165+
]
166+
end
153167
end
154168
end
155169
end

0 commit comments

Comments
 (0)