Sha256: 1270d5fc11041fb185779d86cc3afcd015d2645dca81bf5c8b886f389624d616

Contents?: true

Size: 749 Bytes

Versions: 4

Compression:

Stored size: 749 Bytes

Contents

require 'test_helper'

module Workarea
  module Listrak
    class OrderExporterTest < TestCase
      include Workers

      setup :store_bogus_client_requests
      teardown :reset_bogus_client_requests

      def test_exporting_an_order
        Sidekiq::Callbacks.enable(Listrak::OrderExporter) do
          create_placed_order

          assert_equal 1, BogusDataApi.requests[:orders][:import].size
        end
      end

      private

        def store_bogus_client_requests
          Workarea::Listrak::BogusDataApi.store_requests = true
          Workarea::Listrak::BogusDataApi.reset_requests!
        end

        def reset_bogus_client_requests
          Workarea::Listrak::BogusDataApi.store_requests = false
        end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
workarea-listrak-5.0.4 test/workers/workarea/listrak/order_exporter_test.rb
workarea-listrak-5.0.3 test/workers/workarea/listrak/order_exporter_test.rb
workarea-listrak-5.0.2 test/workers/workarea/listrak/order_exporter_test.rb
workarea-listrak-5.0.1 test/workers/workarea/listrak/order_exporter_test.rb