Commit Graph

202 Commits

Author SHA1 Message Date
Anatoliy Chakkaev f98f62388d Temp. disable test for validation 2013-05-13 22:04:29 -07:00
Anatoliy Chakkaev 06641da2c6 Add context info to validation error 2013-05-13 22:04:29 -07:00
dgsan 1a91605340 Adds test for limit and skip + limit on `all()` queries as in docs.
(Currently not all adapters may pass.)
2013-05-13 22:04:28 -07:00
Anatoliy Chakkaev 83027f9ead Accept related objects when creating instance #247 2013-05-13 22:04:28 -07:00
Anatoliy Chakkaev eecbd32d07 Allow null properties for headless models 2013-05-13 22:04:28 -07:00
Anatoliy Chakkaev a67f75f0be Check types of sync and async getters created by belongsTo, close #266 2013-05-13 22:04:28 -07:00
Anatoliy Chakkaev a73f53521e Fix m2m: only add fk when hasMany have no "through" 2013-05-13 22:04:28 -07:00
Anatoliy Chakkaev c9e97744dd Many-to-many relation
- hasMany {through: Class}
- hasAndBelongsToMany
- some specs in relations.test.js
2013-05-13 22:04:28 -07:00
Anatoliy Chakkaev 9facf369b1 Some tests for scope 2013-05-13 22:04:28 -07:00
Anatoliy Chakkaev 136ea91fbf Organize model.js 2013-05-13 22:04:28 -07:00
Anatoliy Chakkaev c4d4b68413 Datatypes casting 2013-05-13 22:04:28 -07:00
Raymond Feng 3eb6869174 Revert "Fix the test case so that it passes in the same filter"
This reverts commit 7538601b79.
2013-04-15 16:50:49 -07:00
Raymond Feng 7538601b79 Fix the test case so that it passes in the same filter 2013-04-10 21:09:09 -07:00
Anatoliy Chakkaev 43f395d653 Manually require init 2013-04-06 14:57:12 +04:00
Anatoliy Chakkaev 9fc4e5e887 Added datatypes tests 2013-04-06 14:34:16 +04:00
Anatoliy Chakkaev 67d186e26c Fix merged schema test 2013-04-05 02:14:16 +04:00
Anatoliy Chakkaev 4943feb230 Merge transactions 2013-04-05 02:13:14 +04:00
Anatoliy Chakkaev 43d1cbd39e Merge 2013-04-05 02:12:34 +04:00
Anatoliy Chakkaev 3a355851b6 ValidationError instead Error 2013-04-04 19:31:07 +04:00
Anatoliy Chakkaev 704bc965bd Find on hasMany scope method 2013-04-04 00:46:41 +04:00
Anatoliy Chakkaev be17763eca Return valid in case of sync validations 2013-04-01 20:13:55 +04:00
Anatoliy Chakkaev c5019ef354 Test update 2013-04-01 20:10:46 +04:00
Anatoliy Chakkaev b0a1ed3bed Fix validation issue 2013-04-01 20:08:22 +04:00
Anatoliy Chakkaev cf5ed5b877 Transactions 2013-04-01 17:49:12 +04:00
Anatoliy Chakkaev 349931780a Automigrate before relation tests 2013-03-31 15:24:03 +04:00
Anatoliy Chakkaev f36372ba80 Add more love to tests, pr #249 2013-03-31 14:17:25 +04:00
Anatoliy Chakkaev 76c7fbd6ec Merge branch 'http' of github.com:NiKnight/jugglingdb 2013-03-31 14:08:38 +04:00
Anatoliy Chakkaev 0776c51994 Batch create 2013-03-31 13:40:37 +04:00
Scott Nonnenberg 5655e8f4d2 tests only: no afterCreate/afterUpdate on errors
Added tests to ensure that the afterCreate/afterUpdate handlers are not run if the adapter returns an error.
2013-03-30 17:20:32 -07:00
Scott Nonnenberg 2ba862f5af afterDestroy not called on adapter error
Similar to afterCreate and afterUpdate, we don't want to run the afterXXXX handlers if the delete failed according to the adapter.
2013-03-30 17:18:47 -07:00
Anatoliy Chakkaev 5b429e8d41 Fix memory adapter: broken upd attrs 2013-03-30 21:07:16 +04:00
Anatoliy Chakkaev 2f048e79c0 Return instance of object when create 2013-03-30 21:06:09 +04:00
Anatoliy Chakkaev c1e3e78976 Turn off ignoring tests 2013-03-29 12:54:04 +04:00
Anatoliy Chakkaev 839791de2f Upd tests
- skipping
- hook up redis-hq
- some stuff should be moved to advanced-querying tests
2013-03-29 11:43:04 +04:00
Anatoliy Chakkaev 7707b236ff Test hooks and object lifecycle as per #242 2013-03-28 15:27:50 +04:00
Anatoliy Chakkaev 589887715c Tests for data manipulation 2013-03-28 15:27:27 +04:00
Anatoliy Chakkaev e5f541c0b8 Uncomment tests 2013-03-27 22:00:50 +04:00
Anatoliy Chakkaev 2d6cc9aaee Mongodb tolerance 2013-03-27 21:53:07 +04:00
Anatoliy Chakkaev b04a250b63 Update attribute additional test 2013-03-27 18:53:46 +04:00
Anatoliy Chakkaev e75029ebbf Fix memory adapter and test 2013-03-27 17:10:13 +04:00
Anatoliy Chakkaev b6fb04ffe1 Removed include test from common 2013-03-27 04:51:31 +04:00
Anatoliy Chakkaev cfe31d41ec Test destroy 2013-03-27 04:51:00 +04:00
Anatoliy Chakkaev ffdfac30e1 Migration-friendly tests 2013-03-27 04:50:34 +04:00
Anatoliy Chakkaev 7772c32c80 Include test 2013-03-27 04:46:59 +04:00
Anatoliy Chakkaev cba87ce339 Query testing: findOne 2013-03-27 00:50:13 +04:00
Anatoliy Chakkaev 0d5f4a9aad Added test case for #238: password hashing before save 2013-03-27 00:49:02 +04:00
Anatoliy Chakkaev de28603460 Added short syntax for belongsTo 2013-03-27 00:48:14 +04:00
Anatoliy Chakkaev 49be07545a Rewriting tests 2013-03-26 23:33:11 +04:00
Anatoliy Chakkaev d5d07d8806 Make tests importable 2013-03-26 04:41:00 +04:00
Anatoliy Chakkaev f76b56d2fe Another way to define belongsTo 2013-03-26 04:39:47 +04:00