Sha256: f06de8a263132c6a2ef2621b950025e91cf6a6f88e119dbb79ca546a48c2ceec

Contents?: true

Size: 1.2 KB

Versions: 13

Compression:

Stored size: 1.2 KB

Contents

// ========================================================================
// SC.tupleForPropertyPath Tests
// ========================================================================
/*globals module test */

var 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

13 entries across 13 versions & 2 rubygems

Version Path
sproutit-sproutcore-1.0.0.20090408130025 frameworks/sproutcore/frameworks/runtime/tests/core/tupleForPropertyPath.js
sproutit-sproutcore-1.0.0.20090416161445 frameworks/sproutcore/frameworks/runtime/tests/core/tupleForPropertyPath.js
sproutit-sproutcore-1.0.0.20090720093355 frameworks/sproutcore/frameworks/runtime/tests/core/tupleForPropertyPath.js
sproutit-sproutcore-1.0.0.20090720202429 frameworks/sproutcore/frameworks/runtime/tests/core/tupleForPropertyPath.js
sproutit-sproutcore-1.0.0.20090721125122 frameworks/sproutcore/frameworks/runtime/tests/core/tupleForPropertyPath.js
sproutit-sproutcore-1.0.126 frameworks/sproutcore/frameworks/runtime/tests/core/tupleForPropertyPath.js
sproutit-sproutcore-1.0.20090721145251 frameworks/sproutcore/frameworks/runtime/tests/core/tupleForPropertyPath.js
sproutit-sproutcore-1.0.20090721145280 frameworks/sproutcore/frameworks/runtime/tests/core/tupleForPropertyPath.js
sproutit-sproutcore-1.0.20090721145281 frameworks/sproutcore/frameworks/runtime/tests/core/tupleForPropertyPath.js
sproutit-sproutcore-1.0.20090721145282 frameworks/sproutcore/frameworks/runtime/tests/core/tupleForPropertyPath.js
sproutit-sproutcore-1.0.20090721145285 frameworks/sproutcore/frameworks/runtime/tests/core/tupleForPropertyPath.js
sproutit-sproutcore-1.0.203 frameworks/sproutcore/frameworks/runtime/tests/core/tupleForPropertyPath.js
sproutcore-1.0.1003 frameworks/sproutcore/frameworks/runtime/tests/core/tupleForPropertyPath.js