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.4.27 test/services/workarea/create_fulfillment_test.rb
workarea-core-3.5.4 test/services/workarea/create_fulfillment_test.rb
workarea-core-3.4.26 test/services/workarea/create_fulfillment_test.rb
workarea-core-3.5.3 test/services/workarea/create_fulfillment_test.rb
workarea-core-3.4.25 test/services/workarea/create_fulfillment_test.rb
workarea-core-3.5.2 test/services/workarea/create_fulfillment_test.rb
workarea-core-3.4.24 test/services/workarea/create_fulfillment_test.rb
workarea-core-3.5.1 test/services/workarea/create_fulfillment_test.rb
workarea-core-3.4.23 test/services/workarea/create_fulfillment_test.rb
workarea-core-3.4.22 test/services/workarea/create_fulfillment_test.rb
workarea-core-3.5.0 test/services/workarea/create_fulfillment_test.rb
workarea-core-3.4.21 test/services/workarea/create_fulfillment_test.rb
workarea-core-3.5.0.beta.1 test/services/workarea/create_fulfillment_test.rb
workarea-core-3.4.20 test/services/workarea/create_fulfillment_test.rb
workarea-core-3.4.19 test/services/workarea/create_fulfillment_test.rb
workarea-core-3.4.18 test/services/workarea/create_fulfillment_test.rb
workarea-core-3.4.17 test/services/workarea/create_fulfillment_test.rb
workarea-core-3.4.16 test/services/workarea/create_fulfillment_test.rb
workarea-core-3.4.15 test/services/workarea/create_fulfillment_test.rb
workarea-core-3.4.14 test/services/workarea/create_fulfillment_test.rb