From 5e4ffeae9f8b935096ce05eb475a1bbd849091a9 Mon Sep 17 00:00:00 2001 From: John Bintz Date: Tue, 1 Jun 2010 14:29:57 -0400 Subject: [PATCH] ensure query strings are built correctly for mechanize --- spec/private/core/form_spec.rb | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/spec/private/core/form_spec.rb b/spec/private/core/form_spec.rb index aa28fa1..6c91eed 100644 --- a/spec/private/core/form_spec.rb +++ b/spec/private/core/form_spec.rb @@ -48,4 +48,22 @@ describe "Multiple nested params" do webrat_session.should_receive(:post).with("/family", params) click_button end + + it "should correctly construct a query string" do + Webrat.configuration.mode = :mechanize + + with_html <<-HTML + +
+ + +
+ + HTML + + params = { "query" => "my-query" } + + webrat_session.should_receive(:get).with("/search", params) + click_button + end end