Sha256: b1962d7d08f28630f5977522203f3d049d6fae2e09a2be033146dcd504ac7b7e

Contents?: true

Size: 921 Bytes

Versions: 17

Compression:

Stored size: 921 Bytes

Contents

require 'helper'

class TestGetEntryList < Test::Unit::TestCase
  context "A SugarCRM.connection" do
    setup do
      SugarCRM::Connection.new(URL, USER, PASS, {:register_modules => true, :debug => false})
      @response = SugarCRM.connection.get_entry_list(
        "Users",
        "users.deleted = 0",
        {:fields => ["first_name", "last_name"]} 
      )
    end
#    should "return a list of entries when sent #get_entry_list." do
#      assert @response.response.key? "entry_list"
#    end
    should "return a list of entries when sent #get_entry_list and no fields." do
      users = SugarCRM.connection.get_entry_list(
        "Users",
        "users.deleted = 0"
      )
      assert_equal "Administrator", users.first.last_name
    end
    should "return an object when #get_entry_list" do
      assert_instance_of Array, @response
      assert_instance_of SugarCRM::User, @response[0]
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
sugarcrm-0.9.9 test/connection/test_get_entry_list.rb
sugarcrm-0.9.8 test/connection/test_get_entry_list.rb
sugarcrm-0.9.7 test/connection/test_get_entry_list.rb
sugarcrm-0.9.6 test/connection/test_get_entry_list.rb
sugarcrm-0.9.5 test/connection/test_get_entry_list.rb
sugarcrm-0.9.4 test/connection/test_get_entry_list.rb
sugarcrm-0.9.3 test/connection/test_get_entry_list.rb
sugarcrm-0.9.2 test/connection/test_get_entry_list.rb
sugarcrm-0.9.1 test/connection/test_get_entry_list.rb
sugarcrm-0.9.0 test/connection/test_get_entry_list.rb
sugarcrm-0.8.2 test/connection/test_get_entry_list.rb
sugarcrm-0.8.1 test/connection/test_get_entry_list.rb
sugarcrm-0.8.0 test/connection/test_get_entry_list.rb
sugarcrm-0.7.9 test/connection/test_get_entry_list.rb
sugarcrm-0.7.8 test/connection/test_get_entry_list.rb
sugarcrm-0.7.7 test/connection/test_get_entry_list.rb
sugarcrm-0.7.2 test/connection/test_get_entry_list.rb