Also test for nonmatching passwords

bug/bundler_fix
Tod Beardsley 2015-01-26 17:02:58 -06:00
parent 1410477fe9
commit 63c3832d7d
No known key found for this signature in database
GPG Key ID: BD63D0A3EA19CAAC
1 changed files with 23 additions and 9 deletions

View File

@ -141,15 +141,29 @@ describe Msf::Ui::Console::CommandDispatcher::Db do
end end
end end
context "when the credential is absent" do context "when the credential is absent" do
it "should return a blank set" do context "due to a nonmatching username" do
db.cmd_creds("-u", nomatch_username) it "should return a blank set" do
@output.should =~ [ db.cmd_creds("-u", nomatch_username)
"===========", @output.should =~ [
"Credentials", "===========",
"", "Credentials",
"---- ------- ------ ------- ----- ------------", "",
"host service public private realm private_type" "---- ------- ------ ------- ----- ------------",
] "host service public private realm private_type"
]
end
end
context "due to a nonmatching password" do
it "should return a blank set" do
db.cmd_creds("-P", nomatch_password)
@output.should =~ [
"===========",
"Credentials",
"",
"---- ------- ------ ------- ----- ------------",
"host service public private realm private_type"
]
end
end end
end end
end end