diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2016-08-14 14:39:04 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2016-08-14 14:39:04 -0700 |
commit | b6c0bc9c8a6a6dc86b315566e3ab52acc1a5377d (patch) | |
tree | d2ae67e674ae56595b819c5a526374865524274a /activerecord/test | |
parent | fb99a48b063c337317aaf20fe50a02519f553265 (diff) | |
download | rails-b6c0bc9c8a6a6dc86b315566e3ab52acc1a5377d.tar.gz rails-b6c0bc9c8a6a6dc86b315566e3ab52acc1a5377d.tar.bz2 rails-b6c0bc9c8a6a6dc86b315566e3ab52acc1a5377d.zip |
Pass along original attribute to save later recursion
Fixes #26122
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/base_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/activerecord/test/cases/base_test.rb b/activerecord/test/cases/base_test.rb index cd896e5948..bf2c13cfac 100644 --- a/activerecord/test/cases/base_test.rb +++ b/activerecord/test/cases/base_test.rb @@ -115,6 +115,13 @@ class BasicsTest < ActiveRecord::TestCase end end + def test_many_mutations + car = Car.new name: "<3<3<3" + car.engines_count = 0 + 20_000.times { car.engines_count += 1 } + assert car.save + end + def test_limit_without_comma assert_equal 1, Topic.limit("1").to_a.length assert_equal 1, Topic.limit(1).to_a.length |