owasp_zap 0.0.83 → 0.0.84
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/owasp_zap/attack.rb +1 -1
- data/lib/owasp_zap/spider.rb +1 -1
- data/lib/owasp_zap/version.rb +1 -1
- data/spec/zap_spec.rb +21 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: efbd0f5b6e82f4035c9ac6b22bd0c76717b41953
|
4
|
+
data.tar.gz: dbd86af71ade0eb8abda0de46ab870f82b662989
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 67c6c8f8300671379c6c9d34c7b7739f9430978028550bf8abbe3ede54c81520da0740e42a82a244a1d8857b8b9411493358bdab3d04e7de7cf4cb88201f68ec
|
7
|
+
data.tar.gz: 21e6194156ee8ca4553421935c93c79b6a8acddac5acdb6856a1edfeb13bee8cf08654d45957df2b1dd8e358e27700c6a81738d2c91f4ca5335f5d297aef4c5d
|
data/lib/owasp_zap/attack.rb
CHANGED
data/lib/owasp_zap/spider.rb
CHANGED
data/lib/owasp_zap/version.rb
CHANGED
data/spec/zap_spec.rb
CHANGED
@@ -138,4 +138,25 @@ describe "status_for" do
|
|
138
138
|
it "should return an unknown" do
|
139
139
|
@h.status_for(:foo).wont_be_nil
|
140
140
|
end
|
141
|
+
|
142
|
+
it "should return an integer" do
|
143
|
+
@h.spider.status.must_be_kind_of Numeric
|
144
|
+
end
|
145
|
+
it "should return an integer" do
|
146
|
+
@h.spider.status.must_be_kind_of Numeric
|
147
|
+
end
|
141
148
|
end
|
149
|
+
|
150
|
+
describe "running? method" do
|
151
|
+
before do
|
152
|
+
@h = Zap::Zap.new :target=>"http://127.0.0.1"
|
153
|
+
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 => {})
|
154
|
+
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 => {})
|
155
|
+
end
|
156
|
+
it "should return true" do
|
157
|
+
@h.spider.running?.must_equal true
|
158
|
+
end
|
159
|
+
it "should return false" do
|
160
|
+
@h.ascan.running?.must_equal false
|
161
|
+
end
|
162
|
+
end
|