spec/zap_spec.rb in owasp_zap-0.0.9 vs spec/zap_spec.rb in owasp_zap-0.0.81

- old
+ new

@@ -66,12 +66,12 @@ it "base shouldnt be nil" do @zap.base.wont_be :nil? end - it "base default should be http://127.0.0.1:8080" do - assert_equal @zap.base, "http://127.0.0.1:8080" + it "base default should be http://127.0.0.1:8080/JSON" do + assert_equal @zap.base, "http://127.0.0.1:8080/JSON" end end describe "changing default params" do it "should be able to set base" do @@ -136,27 +136,6 @@ @h.status_for(:spider).wont_be_nil end it "should return an unknown" do @h.status_for(:foo).wont_be_nil end - - it "should return an integer" do - @h.spider.status.must_be_kind_of Numeric - end - it "should return an integer" do - @h.spider.status.must_be_kind_of Numeric - end end - -describe "running? method" do - before do - @h = Zap::Zap.new :target=>"http://127.0.0.1" - stub_request(:get, "http://127.0.0.1:8080/JSON/spider/view/status/?zapapiformat=JSON").to_return(:status => 200, :body => {:status=>"90"}.to_json, :headers => {}) - stub_request(:get, "http://127.0.0.1:8080/JSON/ascan/view/status/?zapapiformat=JSON").to_return(:status => 200, :body => {:status=>"100"}.to_json, :headers => {}) - end - it "should return true" do - @h.spider.running?.must_equal true - end - it "should return false" do - @h.ascan.running?.must_equal false - end -end