Sha256: 8096850ff5ef7d0837b617922f39241e883fab93850c0f726aaca3189f1a4c3b

Contents?: true

Size: 1.04 KB

Versions: 1

Compression:

Stored size: 1.04 KB

Contents

require 'spec_helper'

describe QbIif::DSL::Trns do

  let(:expected) { File.read('spec/fixtures/trns.iif') }

  let(:trns) {
    QbIif::IIF.new do
      trns do
        row do
          trnsid 123
          trnstype 'INVOICE'
          date '8/31/1988'
          accnt 'Accounts Receivable'
          name 'Customer'
          _class 'tires:deeptread'
          amount 20
          docnum 1
          clear 'N'
          toprint 'N'
          addr1 'Baker'
          addr2 'Customer'
          saddr1 'Watson'
          saddr2 'Recipient'
          rep 'BOB'
        end

        spl do
          row do
            splid '777'
            trnstype 'INVOICE'
            date '8/31/1988'
            accnt 'Income Account'
            amount '-20'
            clear 'N'
            qnty '-2'
            price 10
            invitem 'Sales Item'
            taxable 'N'
          end
        end

        spl do
          row do
            splid '888'
          end
        end
      end
    end
  }

  subject { trns }

  its(:output) { should eq expected }
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
qb_iif-0.1.0 spec/qb_iif/dsl/trns_spec.rb