spec/lib/moysklad/resources/stock_spec.rb in moysklad-0.1.2 vs spec/lib/moysklad/resources/stock_spec.rb in moysklad-0.1.3

- old
+ new

@@ -37,20 +37,27 @@ expect(subject.consignmentUuid).to_not be_empty end end end - describe 'collection' do + describe 'no consignments' do + let(:count) { 516 } + subject { resource } before do stub_stock_rest end - subject { resource.collection } + it do + expect(subject.page.count).to eq count + end it do - expect(subject.count).to eq 516 + expect(subject.all.count).to eq count end + it do + expect(subject.all.first).to be_a Moysklad::Entities::StockTO + end end end