2011-09-03 16:49:54 +00:00
|
|
|
# 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
|
2013-01-28 21:02:59 +00:00
|
|
|
store_translations(:en, simple_form: { placeholders: { user: { name: "text" } } }) do
|
2011-12-04 12:29:59 +00:00
|
|
|
with_input_for @user, :name, :file
|
|
|
|
assert_no_select 'input[placeholder]'
|
|
|
|
end
|
2011-09-03 16:49:54 +00:00
|
|
|
end
|
|
|
|
end
|