From e97f7fafc561d3adf59fc92832b5ab8ac0751624 Mon Sep 17 00:00:00 2001 From: Bryan Helmkamp Date: Sun, 8 Feb 2009 20:58:43 -0500 Subject: [PATCH] Add a spec for two checkboxes with the same name (array style) --- spec/public/check_spec.rb | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/spec/public/check_spec.rb b/spec/public/check_spec.rb index 9254960..4366a03 100644 --- a/spec/public/check_spec.rb +++ b/spec/public/check_spec.rb @@ -151,4 +151,22 @@ describe "uncheck" do uncheck "remember_me" click_button end + + it "should work with checkboxes with the same name" do + with_html <<-HTML + +
+ + + + + +
+ + HTML + webrat_session.should_receive(:post).with("/login", {"options" => ["1", "2"]}) + check 'Option 1' + check 'Option 2' + click_button + end end