Sha256: ffee8a6f3f95cbadaaa6f5536c43ebda28cd82f6f3d4f2ad061e396e0bad5799

Contents?: true

Size: 1.49 KB

Versions: 2

Compression:

Stored size: 1.49 KB

Contents

# frozen_string_literal: true

require 'test_helper'

class TestOrderItemTest < MiniTest::Test
  def setup
    node = load_xml_fixture('order_items').at_xpath('//xmlns:OrderItem')
    @order_item = OrderItem.new(node)
  end

  def test_asin
    assert_kind_of String, @order_item.asin
  end

  def test_order_item_id
    assert_kind_of String, @order_item.order_item_id
  end

  def test_seller_sku
    assert_kind_of String, @order_item.seller_sku
  end

  def test_title
    assert_kind_of String, @order_item.title
  end

  def test_quantity_ordered
    assert_kind_of Integer, @order_item.quantity_ordered
  end

  def test_quantity_shipped
    assert_kind_of Integer, @order_item.quantity_shipped
  end

  def test_item_price
    assert_kind_of Money, @order_item.item_price
  end

  def test_shipping_price
    assert_kind_of Money, @order_item.shipping_price
  end

  def test_scheduled_delivery_ends_at
    assert_kind_of Time, @order_item.scheduled_delivery_ends_at
  end

  def test_scheduled_delivery_starts_at
    assert_kind_of Time, @order_item.scheduled_delivery_starts_at
  end

  def test_cod_fee
    assert_kind_of Money, @order_item.cod_fee
  end

  def test_cod_fee_discount
    assert_kind_of Money, @order_item.cod_fee_discount
  end

  def test_gift_message_text
    assert_kind_of String, @order_item.gift_message_text
  end

  def test_gift_wrap_price
    assert_kind_of Money, @order_item.gift_wrap_price
  end

  def test_gift_wrap_level
    assert_kind_of String, @order_item.gift_wrap_level
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mws-orders-0.3.1 test/mws/orders/test_order_item.rb
mws-orders-0.3.0 test/mws/orders/test_order_item.rb