2021-06-29 14:41:04 +02:00
|
|
|
require "../spec_helper"
|
|
|
|
|
2021-08-17 18:30:01 +02:00
|
|
|
WebMock.stub(:get, "example.com/form/textarea").to_return(body: <<-BODY
|
2021-06-29 14:41:04 +02:00
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<title>page_title</title>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<form action="post_path" method="post" name="sample_form">
|
|
|
|
<input type="textarea" name="input_textarea">
|
|
|
|
<textarea name="textarea_tag">
|
|
|
|
</form>
|
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
BODY
|
|
|
|
)
|
|
|
|
|
|
|
|
describe "Form Fields CheckBox" do
|
|
|
|
agent = Mechanize.new
|
|
|
|
page = agent.get("http://example.com/form/textarea")
|
|
|
|
form = page.forms[0]
|
|
|
|
|
|
|
|
it "returns textareas" do
|
|
|
|
form.textareas.size.should eq 2
|
|
|
|
end
|
|
|
|
end
|