Sha256: d321401e8de092565049f6a634a3c571e438b7150d86371d34766c0c2daa0b13

Contents?: true

Size: 786 Bytes

Versions: 2

Compression:

Stored size: 786 Bytes

Contents

require_relative 'helper'
include PagoEfectivo

scope do
  test 'should set dev api_server when initialize without option' do
    client = PagoEfectivo::Client.new
    api_server = client.instance_variable_get(:@api_server)
    assert api_server == 'http://pre.pagoefectivo.pe'
  end

  test 'should set prod api_server when initialize if you set option' do
    client = PagoEfectivo::Client.new('production')
    api_server = client.instance_variable_get(:@api_server)
    assert api_server == 'https://pagoefectivo.pe'
  end

  test 'create_markup generate valid xml' do
    client = PagoEfectivo::Client.new
    xml = Gyoku.xml({key: 'value'})
    markup = client.create_markup(xml)
    assert markup.include?('?xml')
  end

  test 'set_key should keep key like binary' do
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
pago_efectivo-0.1.0 test/app_test.rb
pago_efectivo-0.0.1 test/app_test.rb