Sha256: f9da39ce90c68396d307e76da610bb9335f157849525bec3e32f71d39d246804
Contents?: true
Size: 1.13 KB
Versions: 3
Compression:
Stored size: 1.13 KB
Contents
require "spec_helper" describe Uploadcare::Rails::ActionView::FormBuilder, type: :helper do before :each do @post = PostWithCollection.new @form = ActionView::Helpers::FormBuilder.new(:post, @post, helper, {}, nil) end it "should include uploader tag for name" do # not that post has uc file tag = @form.uploadcare_field :file tag.should be_kind_of(String) tag.should have_selector("input", :type => "hidden", "data-multiple" => "true") end it "should override uploadcare- attribute" do tag = @form.uploadcare_field :file, :uploadcare => {:multiple => false} tag.should have_selector("input", :type => "hidden", "data-multiple" => "true") end it "should override data- attribute" do tag = @form.uploadcare_field :file, :data => {:multiple => false} tag.should have_selector("input", :type => "hidden", "data-multiple" => "true") end it "should override data- and uploadcare- attributes" do tag = @form.uploadcare_field :file, :data => {:multiple => false}, :uploadcare => {:multiple => false} tag.should have_selector("input", :type => "hidden", "data-multiple" => "true") end end
Version data entries
3 entries across 3 versions & 1 rubygems