Sha256: e816784e491f336ed807d989ee3925d620744ce0e9d105f0983faaec1434a015

Contents?: true

Size: 1.01 KB

Versions: 2

Compression:

Stored size: 1.01 KB

Contents

require 'test_helper'

module Workarea
  if Plugin.installed?(:moneris)
    class KountMonerisIntegrationTest < Workarea::TestCase
      include KountApiConfig
      include MonerisGatewayVCRConfig

      def test_new_credit_card
        VCR.use_cassette 'kount/integration/moneris_new_credit_card' do
          checkout = create_purchasable_checkout(order: {
            kount_session_id: '12345666',
            ip_address: '170.115.187.68'
          })

          assert(checkout.place_order)
          refute(checkout.order.fraud_suspected_at?)
        end
      end

      def test_saved_credit_card
        VCR.use_cassette 'kount/integration/moneris_saved_credit_card' do
          checkout = create_purchasable_checkout(
            order: {
              kount_session_id: '12345666',
              ip_address: '170.115.187.68'
            },
            payment: "saved_card"
          )

          assert(checkout.place_order)
          refute(checkout.order.fraud_suspected_at?)
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
workarea-kount-3.3.1 test/integration/workarea/kount_moneris_integration_test.rb
workarea-kount-3.3.0 test/integration/workarea/kount_moneris_integration_test.rb