Sha256: 3e2ef3cb90cd25b7d86532bfab032ea255bf0f29de7e21fcc7ea9ae915cb53c2

Contents?: true

Size: 598 Bytes

Versions: 1

Compression:

Stored size: 598 Bytes

Contents

module Workarea
  decorate Storefront::OrderItemViewModelTest, with: :flow_io do
    decorated { include Workarea::FlowIo::FlowFixtures }

    def test_total_price_with_flow
      order = Order.new(
        experience: europe_experience_geo,
        items: [
          {
            product_id: '1234',
            sku: '1234',
            quantity: 1,
            flow_total_price: 10.to_m("EUR")
          }
        ]
      )

      item = order.items.first
      view_model = Storefront::OrderItemViewModel.new(item)

      assert_equal(10.to_m("EUR"), view_model.total_price)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
workarea-flow_io-1.2.1 test/view_models/workarea/storefront/order_item_view_model_test.decorator