rehab customer test
authorSteve Hackbarth <stephenhackbarth@gmail.com>
Mon, 23 Jun 2014 19:58:31 +0000 (15:58 -0400)
committerSteve Hackbarth <stephenhackbarth@gmail.com>
Mon, 23 Jun 2014 19:58:31 +0000 (15:58 -0400)
test/lib/crud.js
test/specs/credit_card.js
test/specs/customer.js

index 152e1dc..e3c4704 100644 (file)
@@ -14,7 +14,7 @@ var _ = require("underscore"),
 
   exports.accountBeforeDeleteActions = [{it: 'saves the account id', action: function (data, done) {
     data.deleteData = {
-      accntId: data.model.get("account"),
+      accntId: data.model.get("account").id || data.model.get("account"),
       accountModel: new XM.Account()
     };
     done();
index e059d72..1aaab1c 100644 (file)
@@ -68,7 +68,7 @@
       read: "ProcessCreditCards"
     },
     createHash : {
-      customer: 95, // TTOYS
+      customer: 102, // XRETAIL. Not a nested object because it's not a toOne from CreditCard
       creditCardType: "V",
       name: "John Smith",
       address1: "123 Main Street",
index 3651272..c7278b0 100644 (file)
@@ -58,7 +58,6 @@ it:true, describe:true, beforeEach:true, before:true, enyo:true */
     @property {CustomerAccount} CRMAccount
     */
   var spec = {
-    skipAll: true,
     recordType: "XM.Customer",
     collectionType: "XM.CustomerListItemCollection",
     /**
@@ -269,7 +268,7 @@ it:true, describe:true, beforeEach:true, before:true, enyo:true */
     @description Tax Registrations panel should exist to attach existing/new Tax Registrations
     to the Customer
     @property {String} id ID attribute
-    @property {Customer} Customer 
+    @property {Customer} Customer
     @property {TaxAuthority} TaxAuthority
     @property {String} Number
     @property {TaxZone} TaxZone
@@ -287,7 +286,7 @@ it:true, describe:true, beforeEach:true, before:true, enyo:true */
         "'number', 'taxZone', 'effective', 'expires', 'notes'", function () {
       });
        /**
-      @member 
+      @member
       @memberof CustomerTaxRegistration
       @description Users can create, update, and delete Tax Registrations if they have the
         MaintainTaxRegistrations privilege, and they can read Tax Registrations if they have