Sha256: 9f1ada69384a6638f52798bf23719213b8b07b8e237c00d2fa1ee7ecbb3f727d

Contents?: true

Size: 514 Bytes

Versions: 10

Compression:

Stored size: 514 Bytes

Contents

# frozen_string_literal: true
# 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

10 entries across 10 versions & 1 rubygems

Version Path
simple_form-5.2.0 test/inputs/file_input_test.rb
simple_form-5.1.0 test/inputs/file_input_test.rb
simple_form-5.0.3 test/inputs/file_input_test.rb
simple_form-5.0.2 test/inputs/file_input_test.rb
simple_form-5.0.1 test/inputs/file_input_test.rb
simple_form-5.0.0 test/inputs/file_input_test.rb
simple_form-4.1.0 test/inputs/file_input_test.rb
simple_form-4.0.1 test/inputs/file_input_test.rb
simple_form-4.0.0 test/inputs/file_input_test.rb
simple_form-3.5.1 test/inputs/file_input_test.rb