Sha256: 60b95de90760bf113bd2c1983c689d05fc5cead1f1bf207b6bbb2bd885d71cf7
Contents?: true
Size: 1.22 KB
Versions: 2
Compression:
Stored size: 1.22 KB
Contents
require 'test_helper' class GetAccountsTest < Test::Unit::TestCase def setup # uncomment this line to debug #Landslider.logger = $stdout $sesson_id1 ||= Landslider.login('LOGINTOKEN=' + LS_INSTANCE_NAME)[:session_id] end def test_get_accounts_without_search result = Landslider.get_accounts($sesson_id1) assert_not_nil result assert_equal false, result[:error] assert_kind_of Array, result[:accounts] assert_equal 6, result[:accounts].size end def test_get_accounts_with_simple_search simple_search = Landslider::WsSearch.new({:first_result_position => 1, :total_results_requested => 1}) result = Landslider.get_accounts($sesson_id1, simple_search) assert_not_nil result assert_equal false, result[:error] assert_kind_of Array, result[:accounts] assert_equal 1, result[:accounts].size end def test_get_accounts_with_search_criterion_search search = Landslider::WsSearch.new search.search_criteria = Landslider::WsSearchCriterion.new('AccountTypeId', 'Equals', '1539484') result = Landslider.get_accounts($sesson_id1, search) assert_not_nil result assert_equal false, result[:error] assert_kind_of Array, result[:accounts] assert_equal 2, result[:accounts].size end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
landslider-0.5.15 | test/get_accounts_test.rb |
landslider-0.5.12 | test/get_accounts_test.rb |