Sha256: 9bf777980a4d1de032bc82822c63d67520609528a648701ef9b93579facb54d2

Contents?: true

Size: 607 Bytes

Versions: 5

Compression:

Stored size: 607 Bytes

Contents

require 'helper'

class TestModule < Test::Unit::TestCase
  context "A SugarCRM::Module instance" do
    
    setup do
      @connection = SugarCRM::Connection.new(URL, USER, PASS)
    end
    
    should "respond to #fields" do
      assert_respond_to SugarCRM.modules[0], :fields
    end
    
    should "return required fields when #required_fields" do
      assert SugarCRM::User._module.required_fields.include? :user_name
    end
    
    should "return the custom table name when #custom_table_name" do
      assert_equal "accounts_cstm", SugarCRM::Account._module.custom_table_name
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
sugarcrm-0.9.7 test/test_module.rb
sugarcrm-0.9.6 test/test_module.rb
sugarcrm-0.9.5 test/test_module.rb
sugarcrm-0.9.4 test/test_module.rb
sugarcrm-0.9.3 test/test_module.rb