diff --git a/src/ios/RealmJS.xcodeproj/project.pbxproj b/src/ios/RealmJS.xcodeproj/project.pbxproj index 43935e72..bde452e7 100644 --- a/src/ios/RealmJS.xcodeproj/project.pbxproj +++ b/src/ios/RealmJS.xcodeproj/project.pbxproj @@ -257,6 +257,10 @@ 029048081C0428DF00ABDED4 /* js_realm.hpp */, 0290480A1C0428DF00ABDED4 /* js_results.hpp */, 0290480C1C0428DF00ABDED4 /* js_schema.hpp */, + F620F0521CAF0B600082977B /* js_class.hpp */, + F6874A3E1CACA5A900EEEE36 /* js_types.hpp */, + F6267BC91CADC30000AC36B1 /* js_util.hpp */, + F620F0591CB7B4C80082977B /* js_object_accessor.hpp */, 029048351C042A3C00ABDED4 /* platform.hpp */, 0290480F1C0428DF00ABDED4 /* rpc.cpp */, 029048101C0428DF00ABDED4 /* rpc.hpp */, @@ -321,10 +325,6 @@ F60103051CC4ADE500EC01BA /* JS */ = { isa = PBXGroup; children = ( - F620F0521CAF0B600082977B /* js_class.hpp */, - F6874A3E1CACA5A900EEEE36 /* js_types.hpp */, - F6267BC91CADC30000AC36B1 /* js_util.hpp */, - F620F0591CB7B4C80082977B /* js_object_accessor.hpp */, ); name = JS; sourceTree = ""; diff --git a/tests/js/object-tests.js b/tests/js/object-tests.js index 3abad10b..13e08cd1 100644 --- a/tests/js/object-tests.js +++ b/tests/js/object-tests.js @@ -468,5 +468,23 @@ module.exports = BaseTest.extend({ TestCase.assertEqual(obj.ignored, undefined); obj.ignored = true; TestCase.assertEqual(obj.ignored, true); + }, + + testCurrentDate: function() { + var DateSchema = { + name: 'Date', + properties: { + currentDate: 'date' + } + }; + + var realm = new Realm({schema: [DateSchema]}); + var currentDate = new Date(); + var object; + realm.write(function() { + object = realm.create('Date', { currentDate: currentDate }); + }); + + TestCase.assertEqual(currentDate.getTime(), object.currentDate.getTime()); } });