Permalink
Browse files

test for readDefault function on Firefox 13 showing that it doesnt re…

…turn a default value if the value is not available. Working in Chrome
  • Loading branch information...
1 parent 2aecc88 commit 986f51ff923c0e3362fbfc288472ff728752959b @dliau dliau committed Jun 13, 2012
Showing with 10 additions and 0 deletions.
  1. +10 −0 frameworks/foundation/tests/system/user_defaults.js
@@ -18,6 +18,10 @@ module("User Defaults",{
obj = SC.Object.create({
bck : 'green'
});
+
+ SC.userDefaults.defaults({
+ 'app:testingValue': 99
+ });
}
});
@@ -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.