Sha256: b38d7a11af27c99df4e835c427eeb0c8d7924148c39c96aec260ed7878bac808

Contents?: true

Size: 496 Bytes

Versions: 8

Compression:

Stored size: 496 Bytes

Contents

# encoding: UTF-8
require 'test_helper'

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

  test "input should generate 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

8 entries across 8 versions & 1 rubygems

Version Path
simple_form-3.0.4 test/inputs/file_input_test.rb
simple_form-3.0.3 test/inputs/file_input_test.rb
simple_form-3.1.0.rc1 test/inputs/file_input_test.rb
simple_form-3.0.2 test/inputs/file_input_test.rb
simple_form-3.0.1 test/inputs/file_input_test.rb
simple_form-3.0.0 test/inputs/file_input_test.rb
simple_form-3.0.0.rc test/inputs/file_input_test.rb
simple_form-3.0.0.beta1 test/inputs/file_input_test.rb