Sha256: f809a8f4b6cd59b35651f5c9682ade7d7d3732004548ba6373e06a14c633e724

Contents?: true

Size: 843 Bytes

Versions: 2

Compression:

Stored size: 843 Bytes

Contents

require 'test_helper'

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

        def test_successful_shipping_info
          order = create_global_e_placed_order

          post storefront.globale_receive_shipping_info_path,
            headers: { 'CONTENT_TYPE' => 'application/json' },
            params: global_e_update_order_shipping_info_body(order: order)

          assert response.ok?

          fulfillment = Fulfillment.find order.id

          assert_equal :shipped, fulfillment.status

          api_events = GlobalE::OrderApiEvents.find(order.id)
          assert api_events.receive_shipping_info.present?
          assert api_events.receive_shipping_info_response.present?
        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/receive_shipping_info_integration_test.rb
workarea-global_e-1.2.1 test/integration/workarea/storefront/global_e_api/receive_shipping_info_integration_test.rb