Sha256: dd525400d750c2d5710f4c802d50dc52cb27b0829bbf1295db8d27d1c8b7a427

Contents?: true

Size: 796 Bytes

Versions: 34

Compression:

Stored size: 796 Bytes

Contents

require 'test_helper'

module Workarea
  class Shipping
    class SkuTest < Workarea::TestCase
      def test_length_units
        sku = create_shipping_sku

        Workarea.with_config do |config|
          config.shipping_options = { units: :imperial }
          assert_equal(:inches, sku.length_units)

          config.shipping_options = { units: :metric }
          assert_equal(:centimeters, sku.length_units)
        end
      end

      def test_weight_units
        sku = create_shipping_sku

        Workarea.with_config do |config|
          config.shipping_options = { units: :imperial }
          assert_equal(:ounces, sku.weight_units)

          config.shipping_options = { units: :metric }
          assert_equal(:grams, sku.weight_units)
        end
      end
    end
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
workarea-core-3.4.45 test/models/workarea/shipping/sku_test.rb
workarea-core-3.4.44 test/models/workarea/shipping/sku_test.rb
workarea-core-3.4.43 test/models/workarea/shipping/sku_test.rb
workarea-core-3.4.42 test/models/workarea/shipping/sku_test.rb
workarea-core-3.4.41 test/models/workarea/shipping/sku_test.rb
workarea-core-3.4.40 test/models/workarea/shipping/sku_test.rb
workarea-core-3.4.39 test/models/workarea/shipping/sku_test.rb
workarea-core-3.4.38 test/models/workarea/shipping/sku_test.rb
workarea-core-3.4.37 test/models/workarea/shipping/sku_test.rb
workarea-core-3.4.36 test/models/workarea/shipping/sku_test.rb
workarea-core-3.4.35 test/models/workarea/shipping/sku_test.rb
workarea-core-3.4.34 test/models/workarea/shipping/sku_test.rb
workarea-core-3.4.33 test/models/workarea/shipping/sku_test.rb
workarea-core-3.4.32 test/models/workarea/shipping/sku_test.rb
workarea-core-3.4.31 test/models/workarea/shipping/sku_test.rb
workarea-core-3.4.30 test/models/workarea/shipping/sku_test.rb
workarea-core-3.4.29 test/models/workarea/shipping/sku_test.rb
workarea-core-3.4.28 test/models/workarea/shipping/sku_test.rb
workarea-core-3.4.27 test/models/workarea/shipping/sku_test.rb
workarea-core-3.4.26 test/models/workarea/shipping/sku_test.rb