diff --git a/lib/capybara/spec/session/attach_file_spec.rb b/lib/capybara/spec/session/attach_file_spec.rb index 4aa584162..380bff71b 100644 --- a/lib/capybara/spec/session/attach_file_spec.rb +++ b/lib/capybara/spec/session/attach_file_spec.rb @@ -71,6 +71,11 @@ @session.body.should include(File.read(@test_file_path)) @session.body.should include(File.read(@another_test_file_path)) end + + it "should not send anything when attaching no files to a multiple upload field" do + @session.click_button('Upload Empty Multiple') + @session.body.should include("Successfully ignored empty file field") + end end context "with a locator that doesn't exist" do diff --git a/lib/capybara/spec/views/form.erb b/lib/capybara/spec/views/form.erb index 3d566c2e5..51806f18b 100644 --- a/lib/capybara/spec/views/form.erb +++ b/lib/capybara/spec/views/form.erb @@ -319,6 +319,20 @@

+

+

+ +

+ +

+ + +

+

+