This method is not needed because Nokogiri does that already

bug/bundler_fix
wchen-r7 2015-10-23 19:38:17 -05:00
parent 065d042ec4
commit f6b9f38326
2 changed files with 1 additions and 23 deletions

View File

@ -119,16 +119,6 @@ class Response < Packet
json
end
# Returns the title from the HTML document.
# You will probably want to use this if you want to grab the web app's banner in the title.
#
# @return [String]
def get_html_title
n = get_html_document
title = n.at_xpath('//title')
title ? title.text : ''
end
# Returns meta tags.
# You will probably want to use this the web app's version info (or other stuff) can be found
# in the metadata.

View File

@ -133,10 +133,6 @@ describe Rex::Proto::Http::Response do
HEREDOC
end
let (:html_title) do
'TEST'
end
let (:meta_name) do
'META_NAME'
end
@ -149,7 +145,7 @@ describe Rex::Proto::Http::Response do
%Q|
<html>
<head>
<title>#{html_title}</title>
<title>TEST</title>
<meta name="#{meta_name}" content="#{meta_content}">
</head>
<body>
@ -267,14 +263,6 @@ describe Rex::Proto::Http::Response do
end
end
describe '#get_html_title' do
context "when the title in the HTML is 'TEST'" do
it "returns 'TEST'" do
expect(subject.get_html_title).to eq(html_title)
end
end
end
describe '#get_html_meta_elements' do
let(:meta_elements) do
subject.get_html_meta_elements