diff --git a/spec/private/rails/attaches_file_spec.rb b/spec/private/rails/attaches_file_spec.rb index 8d1445c..c7e0211 100644 --- a/spec/private/rails/attaches_file_spec.rb +++ b/spec/private/rails/attaches_file_spec.rb @@ -93,4 +93,22 @@ describe "attach_file" do attach_file "Photo", @filename click_button end + + it "should support nested attributes with multiple files" do + with_html <<-HTML + +
+ + + + + +
+ + HTML + webrat_session.should_receive(:post).with("/albums", { "album" => { "photos_attributes" => [{"image" => @uploaded_file}, {"image" => @uploaded_file}] } }) + attach_file "Photo 1", @filename + attach_file "Photo 2", @filename + click_button + end end