1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activemodel/test/cases/deprecated_mass_assignment_security_test.rb

16 lines
419 B
Ruby

require 'cases/helper'
require 'models/project'
class DeprecatedMassAssignmentSecurityTest < ActiveModel::TestCase
def test_attr_accessible_raise_error
assert_raise RuntimeError, /protected_attributes/ do
Project.attr_accessible :username
end
end
def test_attr_protected_raise_error
assert_raise RuntimeError, /protected_attributes/ do
Project.attr_protected :username
end
end
end