Sha256: b67cb86f40a2368d9cf4807686549d2667a743813ada9693380518cc9e892b3f
Contents?: true
Size: 1.25 KB
Versions: 1
Compression:
Stored size: 1.25 KB
Contents
require 'helper' # Replace these with your test instance URL = "http://valet/sugarcrm" USER = "admin" PASS = 'letmein' class TestSugarcrm < Test::Unit::TestCase context "A SugarCRM::Base instance" do setup do @sugarcrm = SugarCRM::Base.new(URL, USER, PASS, {:debug => true}) end should "return a single entry when sent #get_entry." do response = @sugarcrm.get_entry( "Users", 1, {:fields => ["first_name", "last_name"]} ) assert_respond_to 'response', :entry_list end should "return a list of entries when sent #get_entries." do response = @sugarcrm.get_entries( "Users", [1], {:fields => ["first_name", "last_name"]} ) assert_respond_to 'response', :entry_list end should "return a list of entries when sent #get_entry_list." do response = @sugarcrm.get_entry_list( "Users", "users.user_name = \'#{USER}\'", { :fields => ["first_name", "last_name"], :link_fields => [ { "name" => "accounts", "value" => ["id", "name"] } ] } ) assert_respond_to 'response', :entry_list end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
sugarcrm-0.5.1 | test/test_sugarcrm.rb |