ensure query strings are built correctly for mechanize

This commit is contained in:
John Bintz 2010-06-01 14:29:57 -04:00
parent 0856d8d405
commit 5e4ffeae9f

View File

@ -48,4 +48,22 @@ describe "Multiple nested params" do
webrat_session.should_receive(:post).with("/family", params) webrat_session.should_receive(:post).with("/family", params)
click_button click_button
end end
it "should correctly construct a query string" do
Webrat.configuration.mode = :mechanize
with_html <<-HTML
<html>
<form method="get" action="/search">
<input type="text" name="query" value="my-query" />
<input type="submit" />
</form>
</html>
HTML
params = { "query" => "my-query" }
webrat_session.should_receive(:get).with("/search", params)
click_button
end
end end