Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

20 lines (14 sloc) 0.45 kb
require "cases/helper"
class WhiteListTest < ActiveModel::TestCase
def setup
@white_list = ActiveModel::MassAssignmentSecurity::WhiteList.new
@included_key = 'first_name'
@white_list += [ @included_key ]
end
test "deny? is false for included items" do
assert_equal false, @white_list.deny?(@included_key)
end
test "deny? is true for non-included items" do
assert_equal true, @white_list.deny?('admin')
end
end
Jump to Line
Something went wrong with that request. Please try again.