diff options
author | bogdanvlviv <bogdanvlviv@gmail.com> | 2017-03-07 00:09:55 +0200 |
---|---|---|
committer | bogdanvlviv <bogdanvlviv@gmail.com> | 2017-03-16 10:42:33 +0200 |
commit | 5a072ba317aa180b3622145003fb3ed8b93d226f (patch) | |
tree | ada739f4b8106ca0a6cd5cc214622a241d586a7d /activerecord/test/cases/dirty_test.rb | |
parent | f38de5a7b4ea56c8f9f9138248128339a53a1b1f (diff) | |
download | rails-5a072ba317aa180b3622145003fb3ed8b93d226f.tar.gz rails-5a072ba317aa180b3622145003fb3ed8b93d226f.tar.bz2 rails-5a072ba317aa180b3622145003fb3ed8b93d226f.zip |
Remove ability update locking_column value
Diffstat (limited to 'activerecord/test/cases/dirty_test.rb')
-rw-r--r-- | activerecord/test/cases/dirty_test.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/activerecord/test/cases/dirty_test.rb b/activerecord/test/cases/dirty_test.rb index c13a962e3e..f9eccfbda1 100644 --- a/activerecord/test/cases/dirty_test.rb +++ b/activerecord/test/cases/dirty_test.rb @@ -349,13 +349,14 @@ class DirtyTest < ActiveRecord::TestCase def test_partial_update_with_optimistic_locking person = Person.new(first_name: "foo") - old_lock_version = person.lock_version with_partial_writes Person, false do assert_queries(2) { 2.times { person.save! } } Person.where(id: person.id).update_all(first_name: "baz") end + old_lock_version = person.lock_version + with_partial_writes Person, true do assert_queries(0) { 2.times { person.save! } } assert_equal old_lock_version, person.reload.lock_version |