add area
This commit is contained in:
parent
d34a20c73c
commit
48549dcaa2
@ -46,9 +46,9 @@ describe "Mechanize Page test" do
|
|||||||
form.name.should eq "sample_form"
|
form.name.should eq "sample_form"
|
||||||
end
|
end
|
||||||
|
|
||||||
it "return page links" do
|
it "return page links, links means <a> and <area>" do
|
||||||
agent = Mechanize.new
|
agent = Mechanize.new
|
||||||
page = agent.get("http://example.com/link")
|
page = agent.get("http://example.com/link")
|
||||||
page.links.size.should eq 1
|
page.links.size.should eq 2
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -30,6 +30,10 @@ WebMock.stub(:get, "example.com/link").to_return(body: <<-BODY
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<a href="http://example.com/">link text</a>
|
<a href="http://example.com/">link text</a>
|
||||||
|
<map>
|
||||||
|
<area shape="rect" coords="184,6,253,27"
|
||||||
|
href="http://example.com" />
|
||||||
|
</map>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
BODY
|
BODY
|
||||||
|
Loading…
Reference in New Issue
Block a user