Sha256: cf606c3d9d286b251be02133718a7bc3a09c215d30c8120bded3759190f7f8a7

Contents?: true

Size: 632 Bytes

Versions: 11

Compression:

Stored size: 632 Bytes

Contents

require 'helper'

class TestGetEntry < ActiveSupport::TestCase
  context "A SugarCRM.connection" do
    setup do
      @response = SugarCRM.connection.get_entry(
        "Users",
        1,
        {:fields => ["first_name", "last_name", "deleted", "date_modified"]} 
      )
    end
    should "return an object when #get_entry" do 
      assert_instance_of SugarCRM::User, @response
    end
    should "typecast boolean fields properly" do
      assert_instance_of FalseClass, @response.deleted
    end
    should "typecast date_time fields properly" do
      assert_instance_of DateTime, @response.date_modified
    end
  end
end

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
sugarcrm_emp-0.10.5 test/connection/test_get_entry.rb
sugarcrm_emp-0.10.1 test/connection/test_get_entry.rb
sugarcrm_emp-0.10.0 test/connection/test_get_entry.rb
sugarcrm-0.9.18 test/connection/test_get_entry.rb
sugarcrm-0.9.17 test/connection/test_get_entry.rb
sugarcrm-0.9.16 test/connection/test_get_entry.rb
sugarcrm-0.9.15 test/connection/test_get_entry.rb
sugarcrm-0.9.14 test/connection/test_get_entry.rb
sugarcrm-0.9.13 test/connection/test_get_entry.rb
sugarcrm-0.9.12 test/connection/test_get_entry.rb
sugarcrm-0.9.11 test/connection/test_get_entry.rb