Sha256: 426e3ca456fcec86a2fa0cef966e0fb884595d526bfef0bf363c96e24cffc7a2

Contents?: true

Size: 874 Bytes

Versions: 5

Compression:

Stored size: 874 Bytes

Contents

require 'test_helper'

class RemoteEpsilonGmoAfterGatewayTest < MiniTest::Test
  include SamplePaymentMethods

  def gateway
    @gateway ||= ActiveMerchant::Billing::EpsilonGmoAfterGateway.new
  end

  def test_gmo_after_purchase_successfull
    VCR.use_cassette(:gmo_after_purchase_successful) do
      response = gateway.purchase(10000, gmo_after_purchase_detail)

      assert_equal true, response.success?
      assert_equal true, !response.params['redirect'].empty?
    end
  end

  def test_gmo_after_purchase_fail
    invalid_purchase_detail = gmo_after_purchase_detail
    invalid_purchase_detail[:user_id] = ''

    VCR.use_cassette(:gmo_after_purchase_fail) do
      response = gateway.purchase(10000, invalid_purchase_detail)

      assert_equal false, response.success?
      assert_equal true, response.params["error_detail"].valid_encoding?
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
active_merchant-epsilon-0.12.0 test/remote/gateways/remote_epsilon_gmo_after_test.rb
active_merchant-epsilon-0.11.0 test/remote/gateways/remote_epsilon_gmo_after_test.rb
active_merchant-epsilon-0.10.0 test/remote/gateways/remote_epsilon_gmo_after_test.rb
active_merchant-epsilon-0.9.4 test/remote/gateways/remote_epsilon_gmo_after_test.rb
active_merchant-epsilon-0.9.3 test/remote/gateways/remote_epsilon_gmo_after_test.rb