diff options
author | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2015-03-29 21:19:46 +0900 |
---|---|---|
committer | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2015-03-29 21:19:46 +0900 |
commit | 5341cbcdc188ccbff07aacde9cf0df6e17e5db87 (patch) | |
tree | 5d1ebab81dbc664093fb824b2ccfcedcd66821f5 /activerecord/test/cases | |
parent | 8798788c65b0603caf4b55fe7e961e99f2ea4bde (diff) | |
download | rails-5341cbcdc188ccbff07aacde9cf0df6e17e5db87.tar.gz rails-5341cbcdc188ccbff07aacde9cf0df6e17e5db87.tar.bz2 rails-5341cbcdc188ccbff07aacde9cf0df6e17e5db87.zip |
use correct method in batches test
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/batches_test.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/activerecord/test/cases/batches_test.rb b/activerecord/test/cases/batches_test.rb index 9e428098e4..0791dde1f2 100644 --- a/activerecord/test/cases/batches_test.rb +++ b/activerecord/test/cases/batches_test.rb @@ -190,8 +190,9 @@ class EachTest < ActiveRecord::TestCase def test_find_in_batches_should_use_any_column_as_primary_key_when_start_is_not_specified assert_queries(Subscriber.count + 1) do - Subscriber.find_each(:batch_size => 1) do |subscriber| - assert_kind_of Subscriber, subscriber + Subscriber.find_in_batches(batch_size: 1) do |batch| + assert_kind_of Array, batch + assert_kind_of Subscriber, batch.first end end end |