diff --git a/spec/page_spec.cr b/spec/page_spec.cr index c060ba5..a40e0a2 100644 --- a/spec/page_spec.cr +++ b/spec/page_spec.cr @@ -10,7 +10,13 @@ WebMock.stub(:get, "html_example.com").to_return(body: page_title - + +
+ + + +
+ BODY ) @@ -39,4 +45,11 @@ describe "Mechanize Page test" do page = agent.get("http://html_example.com") page.title.should eq "page_title" end + + it "return page forms" do + agent = Mechanize.new + page = agent.get("http://html_example.com") + page.forms.size.should eq 1 + page.forms.first.action.should eq "post_path" + end end