Sha256: 3f4407fb6e699f3b8166cbd836f700fe100864532fd21dcf6901dc2e98306d0a
Contents?: true
Size: 851 Bytes
Versions: 5
Compression:
Stored size: 851 Bytes
Contents
require "spec_helper" describe "Uploadcare::Rails::Formtastic", type: :helper do before :each do @post = Post.new @form = Formtastic::FormBuilder.new(:post, @post, helper, {}) end it 'should create smart uploader field' do tag = @form.input :file, as: :uploadcare_uploader expect(tag).to have_selector('input[role="uploadcare-uploader"]', visible: :all) end it 'should create single uploader field' do tag = @form.input :file, as: :uploadcare_single_uploader expect(tag) .to have_selector('input[role="uploadcare-uploader"][data-multiple="false"]', visible: :all) end it 'should create multiple uploader field' do tag = @form.input :file, as: :uploadcare_multiple_uploader expect(tag) .to have_selector('input[role="uploadcare-uploader"][data-multiple="true"]', visible: :all) end end
Version data entries
5 entries across 5 versions & 1 rubygems