Sha256: b802e15ab856e3f13ae8fa252a9a06ac7a0fcaa36db906f21946cc1d13cd2742

Contents?: true

Size: 600 Bytes

Versions: 6

Compression:

Stored size: 600 Bytes

Contents

require_relative '../test_helper'

describe Ebanx::Command::Request do
  before do
    @params = {
      name: 'João da Silva',
      email: 'joao@mailinator.com',
      currency_code: 'BRL',
      amount: 100.00,
      merchant_payment_code: Random.rand(10000000000),
      payment_type_code: 'boleto',
    }
  end

  it "can't run without arguments" do
    lambda { ebanx.do_request }.must_raise ArgumentError
  end

  it "performs a successful request" do
    response = ebanx.do_request @params
    response.http_code.must_equal 200
    response.response['status'].must_equal 'SUCCESS'
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ebanx-1.3.1 test/ebanx/request_command_test.rb
ebanx-1.3.0 test/ebanx/request_command_test.rb
ebanx-1.2.0 test/ebanx/request_command_test.rb
ebanx-1.1.0 test/ebanx/request_command_test.rb
ebanx-1.0.2 test/ebanx/request_command_test.rb
ebanx-1.0.0 test/ebanx/request_command_test.rb