spec/acfs/resource/query_methods_spec.rb in acfs-0.49.0 vs spec/acfs/resource/query_methods_spec.rb in acfs-0.49.1

- old
+ new

@@ -517,17 +517,24 @@ 'Link' => '' }) end it 'should iterate all pages' do - indecies = [] + indices = [] model.each_item do |item| expect(item).to be_a MyUser - indecies << item.id + indices << item.id end Acfs.run - expect(indecies).to eq [1, 2, 3, 4, 5] + expect(indices).to eq [1, 2, 3, 4, 5] + end + + it 'should pass the collection to the provided block' do + model.each_item do |_item, collection| + expect(collection).to be_a Acfs::Collection + end + Acfs.run end end end end end