Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add test to make sure that pattern component is disable by default

  • Loading branch information...
commit c89166750190e2694bdd8763de9529a1dbba3dc6 1 parent 8d5dcfd
@rafaelfranca rafaelfranca authored
Showing with 5 additions and 0 deletions.
  1. +5 −0 test/inputs/string_input_test.rb
View
5 test/inputs/string_input_test.rb
@@ -72,6 +72,11 @@ class StringInputTest < ActionView::TestCase
assert_select 'input[type=password].password[placeholder=Password Confirmation]#user_password'
end
+ test 'input should not infer pattern from attributes by default' do
+ with_input_for @other_validating_user, :country, :string
+ assert_no_select 'input[pattern="\w+"]'
+ end
+
test 'input should infer pattern from attributes' do
with_input_for @other_validating_user, :country, :string, :pattern => true
assert_select 'input[pattern="\w+"]'
Please sign in to comment.
Something went wrong with that request. Please try again.