Replace attr_accessible with strong parameters

This commit is contained in:
Tom Hughes 2013-06-26 22:53:50 +01:00
parent 3875882172
commit f0feca800d
28 changed files with 73 additions and 75 deletions

View file

@ -44,8 +44,8 @@ class DiaryEntryTest < ActiveSupport::TestCase
private
def diary_entry_valid(attrs, result = true)
entry = DiaryEntry.new(diary_entries(:normal_user_entry_1).attributes, :without_protection => true)
entry.assign_attributes(attrs, :without_protection => true)
entry = DiaryEntry.new(diary_entries(:normal_user_entry_1).attributes)
entry.assign_attributes(attrs)
assert_equal result, entry.valid?, "Expected #{attrs.inspect} to be #{result}"
end
end