blossom
Version:
Modern, Cross-Platform Application Framework
25 lines (16 loc) • 626 B
JavaScript
// ========================================================================
// SC.UserDefaults Base Tests
// ========================================================================
/*globals module test ok isObj equals expects */
var obj; //global variables
suite("User Defaults",{
setup: function(){
obj = SC.Object.create({
bck : 'green'
});
}
});
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');
});