Sha256: 2deb43fd329d23e3f26c895102111709622c0d0d16542886d19e1b64d07b532c

Contents?: true

Size: 733 Bytes

Versions: 37

Compression:

Stored size: 733 Bytes

Contents

require File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'test_helper'))

class JournalLineTest < Test::Unit::TestCase
  include TestHelper
  include Xeroizer::Record
  
  def setup
    @client = Xeroizer::PublicApplication.new(CONSUMER_KEY, CONSUMER_SECRET)
  end
  
  it "journal_line tracking specified correctly" do
    journal = @client.Journal.build
    journal_line = journal.add_journal_line({})
    
    journal_line.add_tracking_category(:name => "Name 1", :option => "Option 1")
    journal_line.add_tracking_category(:name => "Name 2", :option => "Option 2")
    
    doc = Nokogiri::XML(journal_line.to_xml)
    assert_equal 2, doc.xpath("/JournalLine/TrackingCategories/TrackingCategory").size
  end

end

Version data entries

37 entries across 37 versions & 2 rubygems

Version Path
xeroizer-2.20.0 test/unit/models/journal_line_test.rb
xeroizer-2.19.0 test/unit/models/journal_line_test.rb
xeroizer-2.18.1 test/unit/models/journal_line_test.rb
xeroizer-2.17.1 test/unit/models/journal_line_test.rb
xeroizer-2.16.5 test/unit/models/journal_line_test.rb
xeroizer-2.16.4 test/unit/models/journal_line_test.rb
xeroizer-2.16.3 test/unit/models/journal_line_test.rb
xeroizer-2.16.1 test/unit/models/journal_line_test.rb
xeroizer-2.16.0 test/unit/models/journal_line_test.rb
xeroizer-2.15.9 test/unit/models/journal_line_test.rb
xeroizer-2.15.8 test/unit/models/journal_line_test.rb
xeroizer-2.15.7 test/unit/models/journal_line_test.rb
xeroizer-2.15.6 test/unit/models/journal_line_test.rb
xeroizer-float-2.15.5.2 test/unit/models/journal_line_test.rb
xeroizer-float-2.15.5.1 test/unit/models/journal_line_test.rb
xeroizer-2.15.5 test/unit/models/journal_line_test.rb
xeroizer-float-2.15.3.16 test/unit/models/journal_line_test.rb
xeroizer-float-2.15.3.15 test/unit/models/journal_line_test.rb
xeroizer-float-2.15.3.14 test/unit/models/journal_line_test.rb
xeroizer-float-2.15.3.13 test/unit/models/journal_line_test.rb