Sha256: ae66e535fa3e629340146c4761dcff6d581566863b9c3d0ae2b40f956ad24cbc
Contents?: true
Size: 1.2 KB
Versions: 20
Compression:
Stored size: 1.2 KB
Contents
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') describe 'fluid_infusion/_uploader.html.erb' do before do view.stubs(:upload_url).returns("/assets/_PID_/file_assets") view.stubs(:container_id).returns('111') end it "should permit locals for container_content_type" do render :partial => "fluid_infusion/uploader", :locals => {:container_content_type=>"foo_bar"} rendered.should have_selector "form.fl-uploader.fl-progEnhance-basic", :action => "/assets/_PID_/file_assets" do with_tag "input#container_content_type", :value => "foo_bar" end end it "should permit locals for uploader html_options" do render :partial => "fluid_infusion/uploader", :locals => {:html_options=>{:uploader_options => {:accept => "application/pdf"}}} rendered.should have_selector "input#Filedata", :type => "file", :accept=>"application/pdf" end it "should work with no locals passed in" do render rendered.should have_selector "form.fl-uploader.fl-progEnhance-basic", :action => "/assets/_PID_/file_assets" do without_tag "input#container_content_type" with_tag "input#Filedata", :type=>"file" do without_tag "[accept=?]" end end end end
Version data entries
20 entries across 20 versions & 1 rubygems