提交 70244664 编写于 作者: J Justin Collins

Add test for strong_parameters

上级 4f70e6a5
......@@ -36,4 +36,27 @@ class MassAssignDisableTest < Test::Unit::TestCase
end
RUBY
end
def test_strong_parameters_gem
model = "app/models/account.rb"
before_rescan_of model, "rails3" do
replace_with_sexp model do |exp|
exp << s(:call,
nil,
:include,
s(:colon2,
s(:const, :ActiveModel),
:ForbiddenAttributesProtection))
exp
end
end
assert_changes
assert_reindex :models
assert_fixed 2
#Not really a new warning, list of models needing attr_accessible changes
assert_new 1
end
end
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册