Commit Graph

102 Commits

Author SHA1 Message Date
Ari Lazier 6d485866f6 all users should return a dictionary 2016-11-10 13:55:22 -08:00
Søren Vind 87b30fb4ec Add tests of Realm.Sync.User.all and Realm.Sync.User.current. Fix both to only return active (logged-in) users. Fix current return values: Throws if >1 user logged in, returns undefined if no logged in. 2016-11-10 12:54:15 -08:00
Søren Vind 448f68a787 Reformat code, 2 spaces 2016-11-10 12:54:15 -08:00
Søren Vind 164ea8ec79 Port over remaining tests for Realm.Sync.User 2016-11-10 10:35:36 -08:00
Ari Lazier 8ce8f52105 add test for login 2016-11-08 14:07:04 -08:00
Ari Lazier b2e71a5fb6 test fixes 2016-11-08 09:21:27 -08:00
Ari Lazier fde1c5d00d start implementing sync tests 2016-11-08 08:59:30 -08:00
Ari Lazier 92adb669d5 hook up new object store apis 2016-10-26 17:00:46 -07:00
Yavor Georgiev a66198fe46 make tests require the symlinked realm module 2016-10-13 16:09:14 +02:00
Ari Lazier 9d0df0de3d Sync and fine grained notifications 2016-10-04 15:07:14 -07:00
Marius Rackwitz 9d25435105 [Tests] Stop using Realm.Types 2016-08-04 10:10:28 -07:00
Scott Kyle 17e7153a59 Very basic multiprocess change notification test 2016-06-13 17:24:43 -07:00
Scott Kyle 723b50f649 Allow React tests to be async 2016-06-13 17:24:43 -07:00
Scott Kyle 2384cc4036 Reset Realm.defaultPath in testDefaultPath
Or else the rest of the tests use the new default path!
2016-06-13 17:24:43 -07:00
Ari Lazier c7e156a7b8 Merge pull request #488 from realm/al-typos
fixes for typos and added upsert test
2016-06-13 14:51:53 -07:00
Ari Lazier 0a4e0665ae fixes for typos and added upsert test 2016-06-13 14:46:26 -07:00
Ari Lazier 3901bf53dc Merge pull request #479 from realm/al-muti-realm
fix for setting properties to objects from other realms
2016-06-13 14:44:28 -07:00
Scott Kyle cd20d870dd Fix crash from querying with object from another Realm 2016-06-09 15:32:37 -07:00
Ari Lazier 81feca0ce9 fix for setting properties to objects from other realms 2016-06-08 11:22:12 -07:00
Scott Kyle cd0bb079b7 Implement objectForPrimaryKey() method
Resolves #328
2016-06-03 16:51:32 -07:00
Scott Kyle af70bb3c63 Fix all linting issues inside JS tests 2016-05-26 15:47:30 -07:00
Scott Kyle 48394d9c19 Automatically handle deleting test Realms
No longer leave this up to the test. All testing passes through the runTest() function, so we use that spot to delete the Realms. It also now deletes them beforehand too since a crash in a previous run could leave a Realm in place.
2016-05-26 15:47:30 -07:00
Scott Kyle 58bff5f939 Remove commented Objective-C query tests 2016-05-26 15:46:53 -07:00
Scott Kyle 78a8311ba6 Merge branch '0.13.x'
* 0.13.x:
  [0.13.2] Bump version
  fix for upgrading optional date properties
2016-05-26 14:36:17 -07:00
Ari Lazier 027d4fd153 fix for upgrading optional date properties 2016-05-26 13:30:51 -07:00
Scott Kyle f8ba388d14 Fix crash and other errors with Results snapshots
When deleteAll() is called on a Realm, it calls clear() on all of its Tables, which seems to not update TableViews unless they are synced. The is_row_attached(row_ndx) method still returns true otherwise. A workaround is here until that is fixed.

Fixes #434
2016-05-24 11:52:02 -07:00
Ari Lazier 9e05728dce fix for negative timestamps 2016-05-24 11:45:16 -07:00
Scott Kyle 7740665d7d Merge pull request #449 from realm/sk-crash-fix
Fix crash and other errors with Results snapshots
2016-05-24 11:02:53 -07:00
Scott Kyle 60a58382b4 Add tests where deletion happens before snapshot() 2016-05-24 10:23:36 -07:00
Ari Lazier 604fcc73f2 fix for negative timestamps 2016-05-24 08:23:21 -07:00
Scott Kyle e14e922c39 Fix crash and other errors with Results snapshots
When deleteAll() is called on a Realm, it calls clear() on all of its Tables, which seems to not update TableViews unless they are synced. The is_row_attached(row_ndx) method still returns true otherwise. A workaround is here until that is fixed.

Fixes #434
2016-05-20 13:42:17 -07:00
Ari Lazier fd25afe214 add isValid methods to results and list 2016-05-16 16:01:14 -07:00
Scott Kyle 9370eba229 Merge pull request #436 from realm/sk-react-native-25
Updates for React Native 0.25
2016-05-16 14:22:59 -07:00
Scott Kyle 02b770b79a Fix ESLint errors 2016-05-16 14:15:56 -07:00
Ari Lazier 0f74101074 Merge pull request #423 from realm/al-timestamp
Use new timestamp format
2016-05-16 13:52:31 -07:00
Scott Kyle 7a26d192ba Merge pull request #427 from realm/sk-object-inheritance
Fix ES6 class inheritance of Realm.Object with Babel
2016-05-16 11:17:45 -07:00
Scott Kyle c803efd01b Use ".realm" extension in tests for proper cleanup 2016-05-13 15:47:57 -07:00
Ari Lazier d1dcd4ff3f add additional tests 2016-05-13 15:29:59 -07:00
Ari Lazier e7b341dfdb merge latest from master 2016-05-13 15:05:19 -07:00
Ari Lazier 9c1b923797 fixes for test app 2016-05-13 13:05:39 -07:00
Scott Kyle 323583ed67 Merge pull request #417 from realm/sk-node-6
Fix issues in Node 6
2016-05-12 12:39:31 -07:00
Nabil Hachicha 895c6a3056 Copying embedded Realm files using AssetManager from JNI 2016-05-11 19:56:59 +01:00
Nabil Hachicha 57701db8f4 copy Realm file from assets into default storage folder 2016-05-11 03:30:37 +01:00
Scott Kyle 351543ca09 Rename callback based on PR feedback 2016-05-10 11:37:09 -07:00
Scott Kyle 4300e865c7 Abstracted check for Node v6 2016-05-10 11:34:33 -07:00
Scott Kyle 26d2c169a9 Support ES6 class inheritance from Realm.Object
Unfortunately, this was broken because our native Realm.Object constructor was not presenting itself as a function in JS. This fixes that and adds tests.
2016-05-09 16:49:05 -07:00
Ari Lazier 21b58b6a1e test that conversion actually works 2016-05-09 13:32:10 -07:00
Ari Lazier 9c7b01091f convert old date columns 2016-05-09 13:12:48 -07:00
Scott Kyle fef4be96bd Update tests for changing defaults and constructors 2016-05-06 15:41:17 -07:00
Ari Lazier 28a7efcd1b add test for current date 2016-05-05 17:36:48 -07:00