Sha256: ae7bd26831600377d6882c17af63d7e7b2d6df9f7abfc0f1040251ed370b2a1e

Contents?: true

Size: 576 Bytes

Versions: 62

Compression:

Stored size: 576 Bytes

Contents

require 'test_helper'

module Workarea
  class CreateFulfillmentTest < Workarea::TestCase
    setup do
      @order = create_order
    end

    def test_creating_items_per_order_item
      @order.add_item(product_id: '1', sku: 'SKU1')
      @order.add_item(product_id: '2', sku: 'SKU2', quantity: 2)

      CreateFulfillment.new(@order).perform

      fulfillment = Fulfillment.find(@order.id)
      assert_equal(fulfillment.items.count, 2)

      CreateFulfillment.new(@order).perform
      fulfillment.reload
      assert_equal(fulfillment.items.count, 2)
    end
  end
end

Version data entries

62 entries across 62 versions & 1 rubygems

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