Sha256: cf297f62b037a2fa5da617a0f932ba79f3f99a50fd385ee5fbbdfaafe605b25e
Contents?: true
Size: 1.52 KB
Versions: 8
Compression:
Stored size: 1.52 KB
Contents
require 'test_helper' require 'pp' class Salesforce::UserTest < ActiveSupport::TestCase def notest_should_return_sf_user # see test_helper for USERID, PASSWORD, and SECURITY_TOKEN # Salesforce::SfBase.login(USERID, PASSWORD, SECURITY_TOKEN) #Salesforce::User.login(user, password, key) num_of_user = Salesforce::User.all.count puts "The number of users: " + num_of_user.to_s assert_not_nil num_of_user #u = Salesforce::User.first first_user = Salesforce::User.first puts "The first user is: " + first_user.first_name + " " + first_user.last_name assert_not_nil first_user end def notest_try_logout #sid = Array.new #sid[0] = Salesforce::SfBase.connection.binding.instance_variable_get(:@session_id) # --> results = Salesforce::User.connection.binding.logout(Hash.new(:sid_key => sid)) #result = Salesforce::SfBase.connection.binding.invalidateSessions(sid) #assert_equal("invalidateSessionsResponse", result.to_s) #puts "result: " + result.to_s sids = Array.new sids[0] = Salesforce::SfBase.connection.binding.instance_variable_get(:@session_id) sf_user = Salesforce::User.new() # result = sf_user.logout(sids) # logout a particular session result = sf_user.logout # test current user assert result end def notest_show_current_connection user = Salesforce::User.first assert user.current_connection end def test_show_connection_user user = Salesforce::User.first owner = user.connection_owner assert owner.to_s end end
Version data entries
8 entries across 8 versions & 2 rubygems