Sha256: 09b840bc28b22a1892dc90ed7ccbf4e3068d50fe85249842950a20e130f1d0d7

Contents?: true

Size: 437 Bytes

Versions: 62

Compression:

Stored size: 437 Bytes

Contents

require 'test_helper'

module Workarea
  module Inventory
    module Policies
      class StandardTest < TestCase
        def test_available_to_sell
          sku = create_inventory(available: 5, reserve: 3)

          policy = Standard.new(sku)
          assert_equal(2, policy.available_to_sell)

          sku.update_attributes(available: 1)
          assert_equal(0, policy.available_to_sell)
        end
      end
    end
  end
end

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
workarea-core-3.5.27 test/models/workarea/inventory/policies/standard_test.rb
workarea-core-3.5.26 test/models/workarea/inventory/policies/standard_test.rb
workarea-core-3.4.45 test/models/workarea/inventory/policies/standard_test.rb
workarea-core-3.5.25 test/models/workarea/inventory/policies/standard_test.rb
workarea-core-3.5.23 test/models/workarea/inventory/policies/standard_test.rb
workarea-core-3.4.44 test/models/workarea/inventory/policies/standard_test.rb
workarea-core-3.5.22 test/models/workarea/inventory/policies/standard_test.rb
workarea-core-3.4.43 test/models/workarea/inventory/policies/standard_test.rb
workarea-core-3.5.21 test/models/workarea/inventory/policies/standard_test.rb
workarea-core-3.4.42 test/models/workarea/inventory/policies/standard_test.rb
workarea-core-3.5.20 test/models/workarea/inventory/policies/standard_test.rb
workarea-core-3.4.41 test/models/workarea/inventory/policies/standard_test.rb
workarea-core-3.5.19 test/models/workarea/inventory/policies/standard_test.rb
workarea-core-3.4.40 test/models/workarea/inventory/policies/standard_test.rb
workarea-core-3.5.18 test/models/workarea/inventory/policies/standard_test.rb
workarea-core-3.4.39 test/models/workarea/inventory/policies/standard_test.rb
workarea-core-3.5.17 test/models/workarea/inventory/policies/standard_test.rb
workarea-core-3.4.38 test/models/workarea/inventory/policies/standard_test.rb
workarea-core-3.5.16 test/models/workarea/inventory/policies/standard_test.rb
workarea-core-3.4.37 test/models/workarea/inventory/policies/standard_test.rb