Sha256: 2546bbcb878d0459604c8d0b209c4b64c2ed78ea2e109f558e653e35c286f07b

Contents?: true

Size: 710 Bytes

Versions: 28

Compression:

Stored size: 710 Bytes

Contents

require 'test_helper'

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

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

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

      def test_weight_units
        sku = create_shipping_sku

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

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

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
workarea-core-3.5.27 test/models/workarea/shipping/sku_test.rb
workarea-core-3.5.26 test/models/workarea/shipping/sku_test.rb
workarea-core-3.5.25 test/models/workarea/shipping/sku_test.rb
workarea-core-3.5.23 test/models/workarea/shipping/sku_test.rb
workarea-core-3.5.22 test/models/workarea/shipping/sku_test.rb
workarea-core-3.5.21 test/models/workarea/shipping/sku_test.rb
workarea-core-3.5.20 test/models/workarea/shipping/sku_test.rb
workarea-core-3.5.19 test/models/workarea/shipping/sku_test.rb
workarea-core-3.5.18 test/models/workarea/shipping/sku_test.rb
workarea-core-3.5.17 test/models/workarea/shipping/sku_test.rb
workarea-core-3.5.16 test/models/workarea/shipping/sku_test.rb
workarea-core-3.5.15 test/models/workarea/shipping/sku_test.rb
workarea-core-3.5.14 test/models/workarea/shipping/sku_test.rb
workarea-core-3.5.13 test/models/workarea/shipping/sku_test.rb
workarea-core-3.5.12 test/models/workarea/shipping/sku_test.rb
workarea-core-3.5.11 test/models/workarea/shipping/sku_test.rb
workarea-core-3.5.10 test/models/workarea/shipping/sku_test.rb
workarea-core-3.5.9 test/models/workarea/shipping/sku_test.rb
workarea-core-3.5.8 test/models/workarea/shipping/sku_test.rb
workarea-core-3.5.7 test/models/workarea/shipping/sku_test.rb