Sha256: 1e53e88ddda5b3a671c3c701bd6aa9dd52ed243eace8049122c9f83ee9316640
Contents?: true
Size: 1.15 KB
Versions: 5
Compression:
Stored size: 1.15 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) // ========================================================================== (function() { var checkboxView, pane; module("Checkbox Support", { setup: function() { checkboxView = SC.TemplateView.create(SC.CheckboxSupport, { template: SC.Handlebars.compile('<input type="checkbox">') }); pane = SC.MainPane.create({ childViews: [checkboxView] }); pane.append(); }, teardown: function() { pane.remove(); } }); test("value property mirrors input value", function() { checkboxView.$('input').attr('checked', true); equals(checkboxView.get('value'), true, "gets value property from DOM"); checkboxView.$('input').attr('checked', false); checkboxView.set('value', true); ok(checkboxView.$('input').attr("checked"), "sets value of DOM to value property"); }); })();
Version data entries
5 entries across 5 versions & 1 rubygems