Sha256: 513d0bbd270ad983242b7694689a436079691e15276c1c7cc298ef22ce6f82a8
Contents?: true
Size: 1.3 KB
Versions: 14
Compression:
Stored size: 1.3 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.UserDefaults Base Tests // ======================================================================== /*globals module test ok isObj equals expects */ var obj; //global variables module("User Defaults",{ setup: function(){ obj = SC.Object.create({ bck : 'green' }); SC.userDefaults.defaults({ 'app:testingValue': 99 }); } }); test("To check if the user defaults are stored and read from local storage",function(){ SC.userDefaults.writeDefault('Back',obj.bck); equals(SC.userDefaults.readDefault('Back'), obj.bck, 'should read written property'); }); test("Test readDefault function will return a predefined default value when loading in Firefox v13", function() { var expected = 99; var result = SC.userDefaults.readDefault('testingValue'); equals(result, expected, "test should equal 99"); });
Version data entries
14 entries across 14 versions & 1 rubygems