Sha256: a7a1b471863e3453bd24fdea10d81778e6cc758b879b87de690564ef53e8c40b
Contents?: true
Size: 794 Bytes
Versions: 3
Compression:
Stored size: 794 Bytes
Contents
require "spec_helper" describe Ecommerce::Resources::AccountOrder do describe '.find_all', vcr: true do context 'when success' do subject { described_class.find_all('e5732007-7989-4372-8e72-9ec8cf6ee046') } it 'returns a find_all of orders' do expect(subject.class).to eq(Ecommerce::Resources::OrderCollection) expect(subject.orders.first.plan_slug).to eq("rexpense-custom-monthly-brl-5250") expect(subject.orders.first.class).to eq(Ecommerce::Resources::Order) expect(subject.orders.count).to eq(20) end end context 'when not found' do subject { described_class.find_all('wrong-account-uuid') } it 'raises NotFound' do expect{ subject }.to raise_error(Ecommerce::RequestError) end end end end
Version data entries
3 entries across 3 versions & 1 rubygems