Skip to content

Commit

Permalink
Test case for #493 (multiple titles)
Browse files Browse the repository at this point in the history
  • Loading branch information
magneticcoffee committed Oct 31, 2017
1 parent 8af44bc commit 7a4ab37
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions test/test_mechanize_page.rb
Expand Up @@ -250,5 +250,31 @@ def test_search_bad_selectors
assert_empty page.links_with(:search => '//img')
end

def test_multiple_titles
page = html_page <<-BODY
<!doctype html>
<html>
<head>
<title>HTMLTITLE</title>
</head>
<body>
<svg>
<title>SVGTITLE</title>
<metadata id="metadata5">
<rdf:RDF>
<cc:Work>
<dc:title>RDFDCTITLE</dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g></g>
</svg>
</body>
</html>
BODY

assert_equal page.title, "HTMLTITLE"
end

end

0 comments on commit 7a4ab37

Please sign in to comment.