Sha256: d056b2a36c6888508b5e53d197c60492cb3fa2d57962c7f834d956d50ec55d6d
Contents?: true
Size: 961 Bytes
Versions: 4
Compression:
Stored size: 961 Bytes
Contents
require_relative '../test_helper' describe Ebanx::Command::Direct do before do @params = { payment: { name: 'João da Silva', email: 'joao@mailinator.com', currency_code: 'BRL', amount_total: 100.50, merchant_payment_code: Random.rand(10000000000), payment_type_code: 'boleto', document: '13326724691', birth_date: '01/01/1980', zipcode: '70000-000', address: 'Rua Brasil', street_number: '1', city: 'Brasília', state: 'DF', country: 'br', phone_number: '6130001111', due_date: (Time.now + 86400).strftime('%d/%m/%Y') } } end it "can't run without arguments" do lambda { ebanx.do_direct }.must_raise ArgumentError end it "performs a successful request" do response = ebanx.do_direct @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.1 | test/ebanx/direct_command_test.rb |
ebanx-1.3.0 | test/ebanx/direct_command_test.rb |
ebanx-1.2.0 | test/ebanx/direct_command_test.rb |
ebanx-1.1.0 | test/ebanx/direct_command_test.rb |