Permalink
Browse files

Merge branch 'master' into 19735

  • Loading branch information...
2 parents 99e080e + b4ef3d0 commit 848fe92170002e0c17bedd19895710573ef12b5d John Rogelstad committed Mar 17, 2013
@@ -533,7 +533,9 @@ white:true*/
recordType: 'XM.CustomerType',
- documentKey: 'code'
+ documentKey: 'code',
+
+ enforceUpperKey: false
});
@@ -566,21 +568,9 @@ white:true*/
recordType: 'XM.ShipCharge',
- documentKey: 'name'
-
- });
-
- /**
- @class
-
- @extends XM.Model
- */
- XM.ShippingForm = XM.Document.extend({
- /** @scope */
-
- recordType: 'XM.ShippingForm',
-
- documentKey: 'name'
+ documentKey: 'name',
+
+ enforceUpperKey: false
});
@@ -594,7 +584,9 @@ white:true*/
recordType: 'XM.ShipVia',
- documentKey: 'code'
+ documentKey: 'code',
+
+ enforceUpperKey: false
});
@@ -608,7 +600,9 @@ white:true*/
recordType: 'XM.ShipZone',
- documentKey: 'name'
+ documentKey: 'name',
+
+ enforceUpperKey: false
});
@@ -76,7 +76,9 @@ white:true*/
recordType: 'XM.TaxCode',
- documentKey: 'code'
+ documentKey: 'code',
+
+ enforceUpperKey: false
});
@@ -16,7 +16,9 @@ white:true*/
recordType: 'XM.Terms',
- documentKey: 'code'
+ documentKey: 'code',
+
+ enforceUpperKey: false
});
@@ -16,6 +16,8 @@ white:true*/
recordType: 'XM.Characteristic',
documentKey: 'name',
+
+ enforceUpperKey: false,
defaults: {
characteristicType: 0,
@@ -115,6 +115,10 @@ var _ = require("underscore"),
if (typeof (data.model.get(key)) === 'object' && typeof value === 'object') {
// if the data is a model and the test hash looks like {contact: {id: 7}}
assert.equal(data.model.get(key).id, value.id);
+ } else if (key === data.model.documentKey &&
+ data.model.enforceUpperKey === true) {
+ // this is the document key, so it should have been made upper case
+ assert.equal(data.model.get(key), value.toUpperCase());
} else if (typeof (data.model.get(key)) === 'object' && typeof value === 'number') {
// if the data is a model and the test hash looks like {contact: 7}
assert.equal(data.model.get(key).id, value);
@@ -15,7 +15,8 @@ var XVOWS = XVOWS || {};
var data = {};
data.createHash = {
- number: "test account"
+ number: "test account",
+ name: "A test Account"
};
data.updateHash = {

0 comments on commit 848fe92

Please sign in to comment.