aboutsummaryrefslogblamecommitdiffstats
path: root/activemodel/test/cases/deprecated_mass_assignment_security_test.rb
blob: c1fe8822cd382a5cbc427791b5ebc4973d3ff7ad (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16















                                                                  
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