From f07cebc3c279d8b5737bd8102d16de053ac2c95c Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Sat, 26 Apr 2014 08:44:57 -0700 Subject: [PATCH] Update qUnit api3 test --- tests/qunit/crm-api3/test.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/tests/qunit/crm-api3/test.js b/tests/qunit/crm-api3/test.js index 51b0154895..35cd165f34 100644 --- a/tests/qunit/crm-api3/test.js +++ b/tests/qunit/crm-api3/test.js @@ -4,7 +4,7 @@ module('api single'); asyncTest("simple api call", function() { CRM.api3('contact', 'get').done(function(result) { - equal(result.is_error, 0, 'contact get failed'); + equal(result.is_error, 0, 'contact get'); start(); }); }); @@ -17,8 +17,8 @@ asyncTest("array api calls", function() { ['phone', 'get', {phone: '123'}] ]; CRM.api3(params).done(function(result) { - equal(result[0].is_error, 0, 'email get failed'); - equal(result[1].is_error, 0, 'phone get failed'); + equal(result[0].is_error, 0, 'email get'); + equal(result[1].is_error, 0, 'phone get'); start(); }); }); @@ -26,11 +26,13 @@ asyncTest("array api calls", function() { asyncTest("named api calls", function() { var params = { one: ['email', 'getoptions', {field: 'location_type_id'}], - two: ['phone', 'get', {field: 'phone_type_id'}] + two: ['phone', 'getoptions', {field: 'phone_type_id', sequential: 1}], + three: ['phone', 'get'] }; CRM.api3(params).done(function(result) { - ok(result.one.count > 0, 'email getoptions failed'); - ok(result.two.count > 0, 'phone getoptions failed'); + ok(result.one.count > 0, 'email getoptions'); + ok(result.two.count > 0, 'phone getoptions'); + ok(result.three.count > 0, 'phone get'); start(); }); }); -- 2.25.1