mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
16 lines
419 B
Ruby
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
|