aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/test/template/active_model_helper_test.rb
diff options
context:
space:
mode:
authorlulalala <mark@goodlife.tw>2018-03-31 22:42:40 +0800
committerlulalala <mark@goodlife.tw>2019-03-31 22:59:12 +0800
commitabee0343686b476139c476952b1c68f1fba6b3d0 (patch)
treecbc584a71167a90179a4c9515c69084f49cb3d28 /actionview/test/template/active_model_helper_test.rb
parent67d262f70f47154b2476b5fcadf21dd63ebc2597 (diff)
downloadrails-abee0343686b476139c476952b1c68f1fba6b3d0.tar.gz
rails-abee0343686b476139c476952b1c68f1fba6b3d0.tar.bz2
rails-abee0343686b476139c476952b1c68f1fba6b3d0.zip
Raise deprecation for calling `[:f] = 'b'` or `[:f] << 'b'`
Revert some tests to ensure back compatibility
Diffstat (limited to 'actionview/test/template/active_model_helper_test.rb')
-rw-r--r--actionview/test/template/active_model_helper_test.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/actionview/test/template/active_model_helper_test.rb b/actionview/test/template/active_model_helper_test.rb
index 36afed6dd6..c6a3c9064f 100644
--- a/actionview/test/template/active_model_helper_test.rb
+++ b/actionview/test/template/active_model_helper_test.rb
@@ -20,11 +20,11 @@ class ActiveModelHelperTest < ActionView::TestCase
super
@post = Post.new
- @post.errors[:author_name] << "can't be empty"
- @post.errors[:body] << "foo"
- @post.errors[:category] << "must exist"
- @post.errors[:published] << "must be accepted"
- @post.errors[:updated_at] << "bar"
+ assert_deprecated { @post.errors[:author_name] << "can't be empty" }
+ assert_deprecated { @post.errors[:body] << "foo" }
+ assert_deprecated { @post.errors[:category] << "must exist" }
+ assert_deprecated { @post.errors[:published] << "must be accepted" }
+ assert_deprecated { @post.errors[:updated_at] << "bar" }
@post.author_name = ""
@post.body = "Back to the hill and over it again!"