Skip to content

Commit

Permalink
Corrige o local de pagamento para o Banco do Brasil
Browse files Browse the repository at this point in the history
  • Loading branch information
antoniospneto committed Oct 15, 2022
1 parent 2874475 commit c6ab50f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
6 changes: 5 additions & 1 deletion lib/brcobranca/boleto/banco_brasil.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ class BancoBrasil < Base
# Nova instancia do BancoBrasil
# @param (see Brcobranca::Boleto::Base#initialize)
def initialize(campos = {})
campos = { carteira: '18', codigo_servico: false }.merge!(campos)
campos = {
carteira: '18',
codigo_servico: false,
local_pagamento: 'PAGÁVEL EM QUALQUER BANCO.'
}.merge!(campos)
super(campos)
end

Expand Down
8 changes: 4 additions & 4 deletions spec/brcobranca/boleto/banco_brasil_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
before do
@valid_attributes = {
valor: 0.0,
local_pagamento: 'QUALQUER BANCO ATÉ O VENCIMENTO',
local_pagamento: 'PAGÁVEL EM QUALQUER BANCO.',
cedente: 'Kivanio Barbosa',
documento_cedente: '12345678912',
sacado: 'Claudio Pozzebom',
Expand All @@ -30,7 +30,7 @@
expect(boleto_novo.quantidade).to be(1)
expect(boleto_novo.valor).to eq(0.0)
expect(boleto_novo.valor_documento).to eq(0.0)
expect(boleto_novo.local_pagamento).to eql('QUALQUER BANCO ATÉ O VENCIMENTO')
expect(boleto_novo.local_pagamento).to eql('PAGÁVEL EM QUALQUER BANCO.')
expect(boleto_novo.carteira).to eql('18')
expect(boleto_novo.codigo_servico).to be_falsey
end
Expand All @@ -47,7 +47,7 @@
expect(boleto_novo.quantidade).to be(1)
expect(boleto_novo.valor).to eq(0.0)
expect(boleto_novo.valor_documento).to eq(0.0)
expect(boleto_novo.local_pagamento).to eql('QUALQUER BANCO ATÉ O VENCIMENTO')
expect(boleto_novo.local_pagamento).to eql('PAGÁVEL EM QUALQUER BANCO.')
expect(boleto_novo.cedente).to eql('Kivanio Barbosa')
expect(boleto_novo.documento_cedente).to eql('12345678912')
expect(boleto_novo.sacado).to eql('Claudio Pozzebom')
Expand Down Expand Up @@ -202,7 +202,7 @@
it 'Montar código de barras para convenio de 7 digitos e nosso número de 10 e carteira 17' do
valid_attributes = {
valor: 2246.74,
local_pagamento: 'QUALQUER BANCO ATÉ O VENCIMENTO',
local_pagamento: 'PAGÁVEL EM QUALQUER BANCO.',
cedente: 'Kivanio Barbosa',
documento_cedente: '12345678912',
sacado: 'Claudio Pozzebom',
Expand Down

0 comments on commit c6ab50f

Please sign in to comment.