Skip to content

Commit

Permalink
Add test case for ce48b5a
Browse files Browse the repository at this point in the history
  • Loading branch information
kamipo committed Dec 18, 2018
1 parent 30eab94 commit d99984d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions activerecord/test/cases/validations_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,13 @@ def test_throw_away_typing
assert_equal "100,000", d.salary_before_type_cast
end

def test_validates_acceptance_of_with_undefined_attribute_methods
Topic.validates_acceptance_of(:approved)
topic = Topic.new(approved: true)
Topic.undefine_attribute_methods
assert topic.approved
end

def test_validates_acceptance_of_as_database_column
Topic.validates_acceptance_of(:approved)
topic = Topic.create("approved" => true)
Expand Down

0 comments on commit d99984d

Please sign in to comment.