Sha256: 14dc39773e9ef30432e52fcd3b49ad551d278ba304852b47bb122d67da0dfd7f

Contents?: true

Size: 918 Bytes

Versions: 7

Compression:

Stored size: 918 Bytes

Contents

// ==========================================================================
// Project:   SproutCore - JavaScript Application Framework
// Copyright: ©2006-2011 Strobe Inc. and contributors.
//            Portions ©2008-2010 Apple Inc. All rights reserved.
// License:   Licensed under MIT license (see license.js)
// ==========================================================================

/*global module test equals context ok same */

var context = null;

// ..........................................................
// id()
// 
module("SC.RenderContext#id", {
  setup: function() {
    context = SC.RenderContext().id('foo') ;
  }
});

test("id() returns the current id for the tag", function() {
  equals(context.id(), 'foo', 'get id');
});

test("id(bar) alters the current id", function() {
  equals(context.id("bar"), context, "Returns receiver");
  equals(context.id(), 'bar', 'changed to bar');
});

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
spade-0.0.1 sproutcore/frameworks/core_foundation/tests/system/render_context/helpers_basic.js
sproutcore-1.5.0.pre.5 lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/render_context/helpers_basic.js
sproutcore-1.5.0.pre.4.1 lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/render_context/helpers_basic.js
sproutcore-1.5.0.pre.4 lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/render_context/helpers_basic.js
sproutcore-1.5.0.pre.3 lib/frameworks/sproutcore/frameworks/amber/tests/system/render_context/helpers_basic.js
sproutcore-1.4.5 lib/frameworks/sproutcore/frameworks/foundation/tests/system/render_context/helpers_basic.js
sproutcore-1.4.5-java lib/frameworks/sproutcore/frameworks/foundation/tests/system/render_context/helpers_basic.js