1
0
Fork 0
mirror of https://github.com/heartcombo/simple_form.git synced 2022-11-09 12:19:26 -05:00
heartcombo--simple_form/test/inputs/file_input_test.rb

18 lines
514 B
Ruby
Raw Normal View History

# 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
2013-01-28 16:02:59 -05:00
store_translations(:en, simple_form: { placeholders: { user: { name: "text" } } }) do
with_input_for @user, :name, :file
assert_no_select 'input[placeholder]'
end
end
end