Sha256: b83c2503599d17d9cd9b269a5111ecb5454cd6ee8bc80c7401de1820a8b16729

Contents?: true

Size: 792 Bytes

Versions: 31

Compression:

Stored size: 792 Bytes

Contents

require 'test_helper'

class RecordDefinitionTest < Test::Unit::TestCase
  include TestHelper
  
  def setup
    @client = Xeroizer::PublicApplication.new(CONSUMER_KEY, CONSUMER_SECRET)
  end
  
  context "record definitions" do
    
    should "be defined correctly" do
      [ 
        :Account, :BrandingTheme, :Contact, :CreditNote, :Currency, :Invoice,
        :Item, :Journal, :ManualJournal, :Organisation, :Payment, :TaxRate,
        :TrackingCategory
      ].each do | record_type |
        record_factory = @client.send(record_type)
        assert_kind_of(Xeroizer::Record::BaseModel, record_factory)
        assert_kind_of(Xeroizer::GenericApplication, record_factory.application)
        assert_equal(record_type.to_s, record_factory.model_name)
      end
    end
    
  end

end

Version data entries

31 entries across 31 versions & 2 rubygems

Version Path
xeroizer-float-2.15.5.2 test/unit/record_definition_test.rb
xeroizer-float-2.15.5.1 test/unit/record_definition_test.rb
xeroizer-2.15.5 test/unit/record_definition_test.rb
xeroizer-float-2.15.3.16 test/unit/record_definition_test.rb
xeroizer-float-2.15.3.15 test/unit/record_definition_test.rb
xeroizer-float-2.15.3.14 test/unit/record_definition_test.rb
xeroizer-float-2.15.3.13 test/unit/record_definition_test.rb
xeroizer-float-2.15.3.12 test/unit/record_definition_test.rb
xeroizer-float-2.15.3.11 test/unit/record_definition_test.rb
xeroizer-float-2.15.3.10 test/unit/record_definition_test.rb
xeroizer-float-2.15.3.9 test/unit/record_definition_test.rb
xeroizer-float-2.15.3.8 test/unit/record_definition_test.rb
xeroizer-float-2.15.3.7 test/unit/record_definition_test.rb
xeroizer-float-2.15.3.6 test/unit/record_definition_test.rb
xeroizer-float-2.15.3.5 test/unit/record_definition_test.rb
xeroizer-float-2.15.3.4 test/unit/record_definition_test.rb
xeroizer-float-2.15.3.3 test/unit/record_definition_test.rb
xeroizer-float-2.15.3.2 test/unit/record_definition_test.rb
xeroizer-float-2.15.3.1 test/unit/record_definition_test.rb
xeroizer-2.15.3 test/unit/record_definition_test.rb