Sha256: 859cc647ff770613c99a6871ad46938db0574ad5eb71e2eea5c03e5640a62cda
Contents?: true
Size: 833 Bytes
Versions: 15
Compression:
Stored size: 833 Bytes
Contents
RSpec.describe SolidusBactracs::Api::ShipmentSerializer do describe '#call' do it 'serializes the shipment' do shipment = create(:order_ready_to_ship).shipments.first serializer = described_class.new(store_id: '12345678') result = serializer.call(shipment) expect(result).to be_instance_of(Hash) end it 'sets residential = false in address if company is given' do order = create(:order_ready_to_ship, bill_address: build(:address, company: 'ACME Co.'), ship_address: build(:address, company: nil)) shipment = order.shipments.first serializer = described_class.new(store_id: '12345678') result = serializer.call(shipment) expect(result[:billTo][:residential]).to be false expect(result[:shipTo][:residential]).to be true end end end
Version data entries
15 entries across 15 versions & 1 rubygems