Sha256: b1a905fca3d52c7266e1f6bbfc54f48def43bdcf8e252835279b4fdd4ac46070
Contents?: true
Size: 962 Bytes
Versions: 4
Compression:
Stored size: 962 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.5 | test/ebanx/direct_command_test.rb |
ebanx-1.3.4 | test/ebanx/direct_command_test.rb |
ebanx-1.3.3 | test/ebanx/direct_command_test.rb |
ebanx-1.3.2 | test/ebanx/direct_command_test.rb |