Sha256: cf24b48ef58684c33e4af442e126eb3cd3894c4378f937c919d7de1863579f72

Contents?: true

Size: 640 Bytes

Versions: 13

Compression:

Stored size: 640 Bytes

Contents

require 'spec_helper'

describe BrDanfe::DanfeLib::NfceLib::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

13 entries across 13 versions & 1 rubygems

Version Path
br_danfe-0.17.0 spec/br_danfe/danfe_lib/nfce_lib/helper_spec.rb
br_danfe-0.16.0 spec/br_danfe/danfe_lib/nfce_lib/helper_spec.rb
br_danfe-0.15.1 spec/br_danfe/danfe_lib/nfce_lib/helper_spec.rb
br_danfe-0.15.0 spec/br_danfe/danfe_lib/nfce_lib/helper_spec.rb
br_danfe-0.14.5 spec/br_danfe/danfe_lib/nfce_lib/helper_spec.rb
br_danfe-0.14.4 spec/br_danfe/danfe_lib/nfce_lib/helper_spec.rb
br_danfe-0.14.3 spec/br_danfe/danfe_lib/nfce_lib/helper_spec.rb
br_danfe-0.14.2 spec/br_danfe/danfe_lib/nfce_lib/helper_spec.rb
br_danfe-0.14.0 spec/br_danfe/danfe_lib/nfce_lib/helper_spec.rb
br_danfe-0.13.3 spec/br_danfe/danfe_lib/nfce_lib/helper_spec.rb
br_danfe-0.13.2 spec/br_danfe/danfe_lib/nfce_lib/helper_spec.rb
br_danfe-0.13.1 spec/br_danfe/danfe_lib/nfce_lib/helper_spec.rb
br_danfe-0.13.0 spec/br_danfe/danfe_lib/nfce_lib/helper_spec.rb