Sha256: 253e9ef07745d4a022ace4d386896104a98d1f5c27ee0965991e333431de158f

Contents?: true

Size: 1.59 KB

Versions: 30

Compression:

Stored size: 1.59 KB

Contents

// ==========================================================================
// Project:   SproutCore - JavaScript Application Framework
// Copyright: ©2006-2011 Strobe Inc. and contributors.
//            ©2008-2011 Apple Inc. All rights reserved.
// License:   Licensed under MIT license (see license.js)
// ==========================================================================
// ========================================================================
// 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

30 entries across 30 versions & 1 rubygems

Version Path
sproutcore-1.9.2 lib/frameworks/sproutcore/frameworks/runtime/tests/core/tupleForPropertyPath.js
sproutcore-1.9.1 lib/frameworks/sproutcore/frameworks/runtime/tests/core/tupleForPropertyPath.js
sproutcore-1.9.0 lib/frameworks/sproutcore/frameworks/runtime/tests/core/tupleForPropertyPath.js
sproutcore-1.8.2.1 lib/frameworks/sproutcore/frameworks/runtime/tests/core/tupleForPropertyPath.js
sproutcore-1.8.1 lib/frameworks/sproutcore/frameworks/runtime/tests/core/tupleForPropertyPath.js
sproutcore-1.8.0 lib/frameworks/sproutcore/frameworks/runtime/tests/core/tupleForPropertyPath.js
sproutcore-1.7.1.beta-java lib/frameworks/sproutcore/frameworks/runtime/tests/core/tupleForPropertyPath.js
sproutcore-1.7.1.beta lib/frameworks/sproutcore/frameworks/runtime/tests/core/tupleForPropertyPath.js
sproutcore-1.6.0.1-java lib/frameworks/sproutcore/frameworks/runtime/tests/core/tupleForPropertyPath.js
sproutcore-1.6.0.1 lib/frameworks/sproutcore/frameworks/runtime/tests/core/tupleForPropertyPath.js
sproutcore-1.6.0.1-x86-mingw32 lib/frameworks/sproutcore/frameworks/runtime/tests/core/tupleForPropertyPath.js
sproutcore-1.6.0 lib/frameworks/sproutcore/frameworks/runtime/tests/core/tupleForPropertyPath.js
sproutcore-1.6.0-java lib/frameworks/sproutcore/frameworks/runtime/tests/core/tupleForPropertyPath.js
sproutcore-1.6.0.rc.2-x86-mingw32 lib/frameworks/sproutcore/frameworks/runtime/tests/core/tupleForPropertyPath.js
sproutcore-1.6.0.rc.2 lib/frameworks/sproutcore/frameworks/runtime/tests/core/tupleForPropertyPath.js
sproutcore-1.6.0.rc.2-java lib/frameworks/sproutcore/frameworks/runtime/tests/core/tupleForPropertyPath.js
sproutcore-1.6.0.rc.1-x86-mingw32 lib/frameworks/sproutcore/frameworks/runtime/tests/core/tupleForPropertyPath.js
sproutcore-1.6.0.rc.1 lib/frameworks/sproutcore/frameworks/runtime/tests/core/tupleForPropertyPath.js
sproutcore-1.6.0.rc.1-java lib/frameworks/sproutcore/frameworks/runtime/tests/core/tupleForPropertyPath.js
sproutcore-1.6.0.beta.3-x86-mingw32 lib/frameworks/sproutcore/frameworks/runtime/tests/core/tupleForPropertyPath.js