diff options
author | José Valim <jose.valim@gmail.com> | 2012-04-28 00:12:51 -0700 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2012-04-28 00:12:51 -0700 |
commit | dd5524a70741e75d6232d0933f57793a33de5482 (patch) | |
tree | a79c196af27043670ba85d745fb9889dc8e389da /activerecord/test | |
parent | 47a87fb0ec9d2e65914ff94abf2e5428d760fa39 (diff) | |
parent | 3aec521c25a2498c92f721627fc6081c4ccc9e55 (diff) | |
download | rails-dd5524a70741e75d6232d0933f57793a33de5482.tar.gz rails-dd5524a70741e75d6232d0933f57793a33de5482.tar.bz2 rails-dd5524a70741e75d6232d0933f57793a33de5482.zip |
Merge pull request #6029 from aderyabin/fix_depr
removed deprecation warnings
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/base_test.rb | 2 | ||||
-rw-r--r-- | activerecord/test/cases/locking_test.rb | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/test/cases/base_test.rb b/activerecord/test/cases/base_test.rb index 5887782cad..8a4ce5e963 100644 --- a/activerecord/test/cases/base_test.rb +++ b/activerecord/test/cases/base_test.rb @@ -478,7 +478,7 @@ class BasicsTest < ActiveRecord::TestCase if current_adapter?(:MysqlAdapter) or current_adapter?(:Mysql2Adapter) def test_update_all_with_order_and_limit - assert_equal 1, Topic.update_all("content = 'bulk updated!'", nil, :limit => 1, :order => 'id DESC') + assert_equal 1, Topic.limit(1).order('id DESC').update_all(:content => 'bulk updated!') end end diff --git a/activerecord/test/cases/locking_test.rb b/activerecord/test/cases/locking_test.rb index ee180e4154..afb0bd6fd9 100644 --- a/activerecord/test/cases/locking_test.rb +++ b/activerecord/test/cases/locking_test.rb @@ -358,7 +358,7 @@ unless current_adapter?(:SybaseAdapter, :OpenBaseAdapter) || in_memory_db? def test_sane_find_with_lock assert_nothing_raised do Person.transaction do - Person.find 1, :lock => true + Person.lock.find(1) end end end @@ -369,7 +369,7 @@ unless current_adapter?(:SybaseAdapter, :OpenBaseAdapter) || in_memory_db? def test_eager_find_with_lock assert_nothing_raised do Person.transaction do - Person.find 1, :include => :readers, :lock => true + Person.includes(:readers).lock.find(1) end end end |