Browse files

maxlength column definition takes presedence over column db metadata

  • Loading branch information...
1 parent 43677ef commit 524b595923840d6e560ca0e9e1ca8a22fdae9a2f @srbartlett srbartlett committed Jul 21, 2011
Showing with 3 additions and 5 deletions.
  1. +3 −5 test/inputs_test.rb
View
8 test/inputs_test.rb
@@ -166,11 +166,9 @@ def with_input_for(object, attribute_name, type, options={})
assert_select 'input.password[type=password][maxlength=100]'
end
- test 'when not using HTML5, should infer maxlength column definition from validation when present' do
- swap SimpleForm, :html5 => false do
- with_input_for @validating_user, :name, :string
- assert_select 'input.string[maxlength=25]'
- end
+ test 'input should infer maxlength column definition from validation when present' do
+ with_input_for @validating_user, :name, :string
+ assert_select 'input.string[maxlength=25]'
end
test 'when not using HTML5, does not show maxlength attribute' do

0 comments on commit 524b595

Please sign in to comment.