Sha256: 1cb7d1af14a3d991efc0c8ec2f9b99198bbe96ec86a4167654bf9b6e8f0503a3

Contents?: true

Size: 801 Bytes

Versions: 1

Compression:

Stored size: 801 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?
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
active_merchant-epsilon-0.9.2 test/remote/gateways/remote_epsilon_gmo_after_test.rb