1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

use correct method in batches test

This commit is contained in:
yuuji.yaginuma 2015-03-29 21:19:46 +09:00
parent 8798788c65
commit 5341cbcdc1

View file

@ -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