Add some negative tests

bug/bundler_fix
Meatballs 2013-12-17 15:24:27 +00:00
parent 41a00101b0
commit 73d978d5f6
No known key found for this signature in database
GPG Key ID: 5380EAF01F2F8B38
1 changed files with 26 additions and 0 deletions

View File

@ -206,6 +206,32 @@ class Metasploit3 < Msf::Post
end end
end end
def test_noaccess
it "should raise a runtime exception if no access to service" do
ret = false
begin
results = service_stop("gpsvc")
rescue RuntimeError
ret = true
end
ret
end
end
def test_no_service
it "should raise a runtime exception if services doesnt exist" do
ret = false
begin
results = service_status(Rex::Text.rand_text_alpha(5))
rescue RuntimeError
ret = true
end
ret
end
end
=begin =begin
def run def run
blab = datastore['VERBOSE'] blab = datastore['VERBOSE']