Sha256: 5aca97055fa86a9be2efd75254a8c93f2142206b38a4790324a488c01c9f336b

Contents?: true

Size: 635 Bytes

Versions: 2

Compression:

Stored size: 635 Bytes

Contents

require 'spec_helper'

describe BrDanfe::DanfeNfceLib::Helper do
  let(:xml) do
    xml = <<-eos
      <enderDest>
        <xLgr>Rua Tijucas</xLgr>
        <nro>99</nro>
        <xCpl>dwdwa</xCpl>
        <xBairro>Centro</xBairro>
        <cMun>4218004</cMun>
        <xMun>TIJUCAS</xMun>
        <UF>SC</UF>
        <CEP>88200000</CEP>
        <cPais>1058</cPais>
        <xPais>Brasil</xPais>
      </enderDest>
    eos

    BrDanfe::XML.new(xml)
  end

  describe '#address' do
    it 'returns a formated address string' do
      expect(described_class.address(xml)).to eql 'Rua Tijucas, 99, Centro, TIJUCAS - SC'
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
br_danfe-0.12.1 spec/lib/danfe_nfce_lib/helper_spec.rb
br_danfe-0.12.0 spec/lib/danfe_nfce_lib/helper_spec.rb