Sha256: f364bfd3dbce9994a9da9dee4ed00e17cd262f35975975c225af6e2788058719

Contents?: true

Size: 484 Bytes

Versions: 11

Compression:

Stored size: 484 Bytes

Contents

# encoding: UTF-8
require 'test_helper'

class FileInputTest < ActionView::TestCase
  test 'input generates a file field' do
    with_input_for @user, :name, :file
    assert_select 'input#user_name[type=file]'
  end

  test "input generates a file field that doesn't accept placeholder" do
    store_translations(:en, simple_form: { placeholders: { user: { name: "text" } } }) do
      with_input_for @user, :name, :file
      assert_no_select 'input[placeholder]'
    end
  end
end

Version data entries

11 entries across 11 versions & 3 rubygems

Version Path
simple_form-3.5.0 test/inputs/file_input_test.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/simple_form-3.4.0/test/inputs/file_input_test.rb
simple_form-3.4.0 test/inputs/file_input_test.rb
simple_form-3.3.1 test/inputs/file_input_test.rb
simple_form-3.3.0 test/inputs/file_input_test.rb
simple_form-3.2.1 test/inputs/file_input_test.rb
sc_core-0.0.7 test/dummy/vendor/bundle/ruby/2.2.0/gems/simple_form-3.2.0/test/inputs/file_input_test.rb
simple_form-3.2.0 test/inputs/file_input_test.rb
simple_form-3.1.1 test/inputs/file_input_test.rb
simple_form-3.1.0 test/inputs/file_input_test.rb
simple_form-3.1.0.rc2 test/inputs/file_input_test.rb