Sha256: eff2f786976a83b7a2af712930ff7833665a47ba4202cfad1ab560da02e5d9da

Contents?: true

Size: 653 Bytes

Versions: 3

Compression:

Stored size: 653 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
    
    # TODO: Figure out a way to test this.
    #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

3 entries across 3 versions & 1 rubygems

Version Path
sugarcrm-0.9.10 test/test_module.rb
sugarcrm-0.9.9 test/test_module.rb
sugarcrm-0.9.8 test/test_module.rb