-) Code formatting
-) rspec tests
This commit is contained in:
@@ -20,11 +20,11 @@ require File.expand_path(File.dirname(__FILE__) + '/wpscan_helper')
|
||||
|
||||
describe WpPlugin do
|
||||
before :each do
|
||||
@instance = WpItem.new(:url => "http://sub.example.com/path/to/wordpress/",
|
||||
:path => "plugins/test/asdf.php",
|
||||
:vulns_xml => "XXX.xml",
|
||||
:name => "test",
|
||||
:vulns_xpath => "XX"
|
||||
@instance = WpItem.new(:url => "http://sub.example.com/path/to/wordpress/",
|
||||
:path => "plugins/test/asdf.php",
|
||||
:vulns_xml => "XXX.xml",
|
||||
:name => "test",
|
||||
:vulns_xpath => "XX"
|
||||
)
|
||||
end
|
||||
|
||||
@@ -174,19 +174,19 @@ describe WpPlugin do
|
||||
|
||||
describe "#==" do
|
||||
it "should return false" do
|
||||
instance2 = WpItem.new(:url => "http://sub.example.com/path/to/wordpress/",
|
||||
:path => "plugins/newname/asdf.php",
|
||||
:vulns_xml => "XXX.xml",
|
||||
:vulns_xpath => "XX"
|
||||
instance2 = WpItem.new(:url => "http://sub.example.com/path/to/wordpress/",
|
||||
:path => "plugins/newname/asdf.php",
|
||||
:vulns_xml => "XXX.xml",
|
||||
:vulns_xpath => "XX"
|
||||
)
|
||||
(@instance==instance2).should == false
|
||||
end
|
||||
|
||||
it "should return true" do
|
||||
instance2 = WpItem.new(:url => "http://sub.example.com/path/to/wordpress/",
|
||||
:path => "plugins/test/asdf.php",
|
||||
:vulns_xml => "XXX.xml",
|
||||
:vulns_xpath => "XX"
|
||||
instance2 = WpItem.new(:url => "http://sub.example.com/path/to/wordpress/",
|
||||
:path => "plugins/test/asdf.php",
|
||||
:vulns_xml => "XXX.xml",
|
||||
:vulns_xpath => "XX"
|
||||
)
|
||||
(@instance==instance2).should == true
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user