aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test
diff options
context:
space:
mode:
authoryuuji.yaginuma <yuuji.yaginuma@gmail.com>2017-11-26 10:08:07 +0900
committeryuuji.yaginuma <yuuji.yaginuma@gmail.com>2017-11-26 10:08:07 +0900
commitfbb8b373472e40aadd4c604d8574c0a82074a84a (patch)
treeacf616afb21f450ef862d98dde98b711e43e3594 /railties/test
parent11720c23476a49c6c75239182f096847172b1683 (diff)
downloadrails-fbb8b373472e40aadd4c604d8574c0a82074a84a.tar.gz
rails-fbb8b373472e40aadd4c604d8574c0a82074a84a.tar.bz2
rails-fbb8b373472e40aadd4c604d8574c0a82074a84a.zip
Remove field ids from scaffold form
This was added with 27f103fc7e3260efe0b8dde66bf5354f2202ee32 for link labels and fields. However, `form_with` changed to generates ids by default with d3893ec38ec61282c2598b01a298124356d6b35a. So I think that adding an explicit ids is unnecessary.
Diffstat (limited to 'railties/test')
-rw-r--r--railties/test/generators/scaffold_generator_test.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/railties/test/generators/scaffold_generator_test.rb b/railties/test/generators/scaffold_generator_test.rb
index b6294c3b94..29426cd99f 100644
--- a/railties/test/generators/scaffold_generator_test.rb
+++ b/railties/test/generators/scaffold_generator_test.rb
@@ -471,8 +471,8 @@ class ScaffoldGeneratorTest < Rails::Generators::TestCase
end
assert_file "app/views/accounts/_form.html.erb" do |content|
- assert_match(/^\W{4}<%= form\.text_field :name, id: :account_name %>/, content)
- assert_match(/^\W{4}<%= form\.text_field :currency_id, id: :account_currency_id %>/, content)
+ assert_match(/^\W{4}<%= form\.text_field :name %>/, content)
+ assert_match(/^\W{4}<%= form\.text_field :currency_id %>/, content)
end
end
@@ -495,8 +495,8 @@ class ScaffoldGeneratorTest < Rails::Generators::TestCase
end
assert_file "app/views/users/_form.html.erb" do |content|
- assert_match(/<%= form\.password_field :password, id: :user_password %>/, content)
- assert_match(/<%= form\.password_field :password_confirmation, id: :user_password_confirmation %>/, content)
+ assert_match(/<%= form\.password_field :password %>/, content)
+ assert_match(/<%= form\.password_field :password_confirmation %>/, content)
end
assert_file "app/views/users/index.html.erb" do |content|