Sha256: 5d0e01a289159a2a527697c7fdcf214a7a633de2d2765f7a854486a94e2280f4

Contents?: true

Size: 726 Bytes

Versions: 2

Compression:

Stored size: 726 Bytes

Contents

require 'test_helper'

module Workarea
  module Storefront
    module GlobalEApi
      class RemoveRestrictedProductsIntegrationTest < Workarea::IntegrationTest
        include GlobalESupport

        def test_successful_post
          order = create_global_e_completed_checkout
          path = storefront.globale_remove_restricted_products_path(
            format: :json
          )

          post path, params: {
            'MerchantGUID' => "abcdabcd-abcd-abcd-abcd-abcdabcdabcd",
            'CartId' => order.global_e_token,
            'RemovedProductCodes' => order.items.map(&:sku)
          }

          assert_empty(order.reload.items)
          assert_response(:success)
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
workarea-global_e-1.3.0 test/integration/workarea/storefront/global_e_api/remove_restricted_products_integration_test.rb
workarea-global_e-1.2.1 test/integration/workarea/storefront/global_e_api/remove_restricted_products_integration_test.rb