Sha256: 4920a864a77e3418f2e7b424076414b3f4c18a49be9fcf2aa2b9db9501e55ce1
Contents?: true
Size: 848 Bytes
Versions: 4
Compression:
Stored size: 848 Bytes
Contents
require 'helper' describe OwaspZap::Alert do before do @scanner = OwaspZap::Scanner.new :base=>"http://127.0.0.1:8080" end it "should not be_nil" do refute @scanner.nil? end it "should respond_to view" do @scanner.must_respond_to :view end it "enable should return true" do stub_request(:get, "http://127.0.0.1:8080/JSON/ascan/action/enableScanners/?ids=0,1&zapapiformat=JSON").to_return(:status => 200, :body => "{\"Result\":\"OK\"}" , :headers => {}) @scanner.enable([0,1]).wont_be_nil end it "disable should return true" do stub_request(:get, "http://127.0.0.1:8080/JSON/ascan/action/disableScanners/?ids=0,1&zapapiformat=JSON").to_return(:status => 200, :body => "{\"Result\":\"OK\"}" , :headers => {}) @scanner.disable([0,1]).wont_be_nil end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
owasp_zap-0.1.0 | spec/scanner_spec.rb |
owasp_zap-0.0.95 | spec/scanner_spec.rb |
owasp_zap-0.0.94 | spec/scanner_spec.rb |
owasp_zap-0.0.93 | spec/scanner_spec.rb |