Skip to content

Commit

Permalink
maxlength column definition takes presedence over column db metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
srbartlett committed Jul 20, 2011
1 parent 43677ef commit 524b595
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions test/inputs_test.rb
Expand Up @@ -166,11 +166,9 @@ def with_input_for(object, attribute_name, type, options={})
assert_select 'input.password[type=password][maxlength=100]' assert_select 'input.password[type=password][maxlength=100]'
end end


test 'when not using HTML5, should infer maxlength column definition from validation when present' do test 'input should infer maxlength column definition from validation when present' do
swap SimpleForm, :html5 => false do with_input_for @validating_user, :name, :string
with_input_for @validating_user, :name, :string assert_select 'input.string[maxlength=25]'
assert_select 'input.string[maxlength=25]'
end
end end


test 'when not using HTML5, does not show maxlength attribute' do test 'when not using HTML5, does not show maxlength attribute' do
Expand Down

0 comments on commit 524b595

Please sign in to comment.