Sha256: 06277694c42b6a675ad55b5e9ca1bf7ee1bb39d9dcadfdb07e97f3987f10ac3f
Contents?: true
Size: 1.21 KB
Versions: 40
Compression:
Stored size: 1.21 KB
Contents
// ======================================================================== // SC.tupleForPropertyPath Tests // ======================================================================== /*globals module test */ var object, object1,object3; //global variables module("Checking the tuple for property path",{ setup: function(){ object = SC.Object.create({ name:'SproutCore', value:'', //no value defined for the property objectA:SC.Object.create({ propertyVal:"chainedProperty" }) }); } }); test("should check for the tuple property", function() { var object2 = []; object2 = SC.tupleForPropertyPath(object.name,''); equals(object2[0], window, "the window object"); equals(object2[1],'SproutCore',"the property name"); object2 = SC.tupleForPropertyPath(object.objectA.propertyVal,'object'); equals(object2[0],'object',"the root"); equals(object2[1],'chainedProperty',"a chained property"); }); test("should check for the tuple property when path is undefined",function(){ //test case where no property defined var object2; object2 = SC.tupleForPropertyPath(object.value,''); equals(YES,object2 === null,'returns null for undefined path'); });
Version data entries
40 entries across 40 versions & 2 rubygems