Sha256: 59ae0925d48a02efe549b373a5f888382c421ada219c5b11a888b950d7fbae31

Contents?: true

Size: 697 Bytes

Versions: 11

Compression:

Stored size: 697 Bytes

Contents

require 'helper'

class TestGetEntry < Test::Unit::TestCase
  context "A SugarCRM.connection" do
    setup do
      SugarCRM::Connection.new(URL, USER, PASS, {:debug => false })
      @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 & 1 rubygems

Version Path
sugarcrm-0.9.10 test/connection/test_get_entry.rb
sugarcrm-0.9.9 test/connection/test_get_entry.rb
sugarcrm-0.9.8 test/connection/test_get_entry.rb
sugarcrm-0.9.7 test/connection/test_get_entry.rb
sugarcrm-0.9.6 test/connection/test_get_entry.rb
sugarcrm-0.9.5 test/connection/test_get_entry.rb
sugarcrm-0.9.4 test/connection/test_get_entry.rb
sugarcrm-0.9.3 test/connection/test_get_entry.rb
sugarcrm-0.9.2 test/connection/test_get_entry.rb
sugarcrm-0.9.1 test/connection/test_get_entry.rb
sugarcrm-0.9.0 test/connection/test_get_entry.rb