Skip to content

Commit

Permalink
test for readDefault function on Firefox 13 showing that it doesnt re…
Browse files Browse the repository at this point in the history
…turn a default value if the value is not available. Working in Chrome
  • Loading branch information
David Liau committed Jun 13, 2012
1 parent 2aecc88 commit 986f51f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions frameworks/foundation/tests/system/user_defaults.js
Expand Up @@ -18,6 +18,10 @@ module("User Defaults",{
obj = SC.Object.create({
bck : 'green'
});

SC.userDefaults.defaults({
'app:testingValue': 99
});
}
});

Expand All @@ -28,3 +32,9 @@ test("To check if the user defaults are stored and read from local storage",func
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");
});

0 comments on commit 986f51f

Please sign in to comment.