Sha256: 535f82e61bf50557d10eacb346cdf9d418c58043068114c07be94aea6b70f035

Contents?: true

Size: 1.05 KB

Versions: 2

Compression:

Stored size: 1.05 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 "HSBC"'
          _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

2 entries across 2 versions & 1 rubygems

Version Path
qb_iif-0.1.2 spec/qb_iif/dsl/trns_spec.rb
qb_iif-0.1.1 spec/qb_iif/dsl/trns_spec.rb