Sha256: 9061514fa6809aab6d22a3196442f0590b0c571aa2dfa9b75703d2183f97b44c

Contents?: true

Size: 601 Bytes

Versions: 4

Compression:

Stored size: 601 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

4 entries across 4 versions & 1 rubygems

Version Path
ebanx-1.3.5 test/ebanx/request_command_test.rb
ebanx-1.3.4 test/ebanx/request_command_test.rb
ebanx-1.3.3 test/ebanx/request_command_test.rb
ebanx-1.3.2 test/ebanx/request_command_test.rb