Sha256: 3d73a8e42b91ec128edd55a1b577f186eb8f2c9dacfa299e24de2b4ef0e3a7e3

Contents?: true

Size: 552 Bytes

Versions: 8

Compression:

Stored size: 552 Bytes

Contents

require 'spec_helper'

RSpec.describe SolidusBolt::ShipmentDecorator do
  describe '#bolt_shipment' do
    subject(:bolt_shipment) { shipment.bolt_shipment }

    let(:shipment) { create(:shipment, number: 'S000000001') }
    let(:ship_address) { shipment.order.ship_address }

    it 'is expected' do
      expect(bolt_shipment).to match hash_including(
        shipping_address: hash_including(postal_code: ship_address.zipcode, country_code: ship_address.country_iso),
        reference: 'S000000001',
        cost: 10_000
      )
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
solidus_bolt-0.7.2 spec/decorators/models/solidus_bolt/shipment_decorator_spec.rb
solidus_bolt-0.7.1 spec/decorators/models/solidus_bolt/shipment_decorator_spec.rb
solidus_bolt-0.7.0 spec/decorators/models/solidus_bolt/shipment_decorator_spec.rb
solidus_bolt-0.6.0 spec/decorators/models/solidus_bolt/shipment_decorator_spec.rb
solidus_bolt-0.5.0 spec/decorators/models/solidus_bolt/shipment_decorator_spec.rb
solidus_bolt-0.4.0 spec/decorators/models/solidus_bolt/shipment_decorator_spec.rb
solidus_bolt-0.3.0 spec/decorators/models/solidus_bolt/shipment_decorator_spec.rb
solidus_bolt-0.2.0 spec/decorators/models/solidus_bolt/shipment_decorator_spec.rb