Sha256: 99db9cdb857008115f4929fca2fcfe56786ce8066ba477d2e53d5841fd7c7233

Contents?: true

Size: 832 Bytes

Versions: 9

Compression:

Stored size: 832 Bytes

Contents

require File.join(File.dirname(__FILE__), '../test_helper.rb')

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

9 entries across 9 versions & 1 rubygems

Version Path
xeroizer-0.3.5 test/unit/record_definition_test.rb
xeroizer-0.3.4 test/unit/record_definition_test.rb
xeroizer-0.3.3 test/unit/record_definition_test.rb
xeroizer-0.3.2 test/unit/record_definition_test.rb
xeroizer-0.3.1 test/unit/record_definition_test.rb
xeroizer-0.3.0 test/unit/record_definition_test.rb
xeroizer-0.2.2 test/unit/record_definition_test.rb
xeroizer-0.2.1 test/unit/record_definition_test.rb
xeroizer-0.2.0 test/unit/record_definition_test.rb