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:
parent
8798788c65
commit
5341cbcdc1
1 changed files with 3 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue