Commit Graph

289 Commits

Author SHA1 Message Date
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
Anatoliy Chakkaev 8d53ed5e82 Docs for models 2013-03-25 15:04:07 +04:00
Anatoliy Chakkaev 567de88a10 Fix test 2013-03-25 02:29:13 +04:00
Anatoliy Chakkaev e91b0d6c49 Switch to mocha testing in travis 2013-03-25 02:25:43 +04:00
Anatoliy Chakkaev 716318bedd Rewrite validations in mocha 2013-03-25 02:21:18 +04:00
Anatoliy Chakkaev 50850d80be Minor test amends 2013-03-25 01:29:07 +04:00
Anatoliy Chakkaev d4a526f5b3 Remove old hooks tests 2013-03-25 01:28:45 +04:00
Anatoliy Chakkaev 5ea5da0153 Rewrite hooks API
This commit breaks compatibility, but adds consistent API and allow modify data of update
2013-03-25 01:25:10 +04:00
Anatoliy Chakkaev fcc2869806 Defaults test and fixes
When property type is "undefined" - apply default value
2013-03-24 17:37:13 +04:00
Anatoliy Chakkaev aad21e916c Added json test 2013-03-19 14:05:38 +04:00
Anatoliy Chakkaev b9eaba0166 Coding style in helper 2013-02-19 16:32:44 +08:00
Anatoliy Chakkaev 7bb233e269 Fix package version exposing 2013-02-19 16:32:21 +08:00
Anatoliy Chakkaev 3d64056c39 Absolute paths in README.md, fixes #208 2013-02-16 23:55:51 +08:00
Anatoliy Chakkaev 27a16dbeae Remove logging 2013-02-10 04:53:53 +08:00
Anatoliy Chakkaev 6e1037f987 Organize test with Log and Dog 2013-02-10 04:53:37 +08:00
Anatoliy Chakkaev 412a46d603 FIxed test for belongsTo 2013-02-10 04:15:43 +08:00
dgsan 497dcc887d Unit test for bug fix related to belongsTo relation.
It declares a Schema, uses memory. If it should be run for ALL DBs it will need to be changed.

Should fail pre cba174b and pass currently.
2013-02-08 10:25:38 -07:00
Anatoliy Chakkaev a5e84c9f32 Update broken test case 2013-01-23 07:48:56 +07:00
Anatoliy Chakkaev c6d7360f51 Update test for #128 2013-01-22 23:57:30 +07:00
1602 a770f20c08 One more fix in updateAttribute test with uniqueness validation 2013-01-22 03:54:06 +07:00
Anatoliy Chakkaev 3919630d9a Update validations test 2013-01-22 03:48:12 +07:00
Anatoliy Chakkaev 0f592d4bf5 Implement schema.extendModel, closes #157 2013-01-22 01:48:04 +07:00
Anatoliy Chakkaev 60a680f039 Add adapter (memory-bogus) test 2013-01-22 01:22:08 +07:00
Anatoliy Chakkaev 91fee1d565 Make memory adapter async 2013-01-22 01:21:43 +07:00
Anatoliy Chakkaev 40b64cfc5e Added test for #191 2013-01-22 00:48:10 +07:00
Robb Lovell 84a9582bc0 attempted to write a test for hasmany all function. this commit has it commented out 2013-01-17 12:00:59 -08:00
Anatoliy Chakkaev 5062beb99b Travis env update, compare ids as strings 2012-12-24 22:47:49 +04:00
Anatoliy Chakkaev 0d433c1c5d merge 2012-12-19 19:00:00 +04:00
Anatoliy Chakkaev acc0a71bde Update railwayjs name, add ability to skip tests 2012-12-19 18:57:21 +04:00
Sébastien Drouyer 61ffdbc513 added filter on schema though I am not sure it will be used 2012-12-17 00:02:38 +01:00
Sébastien Drouyer 708265df22 merged + removed preprocessdata callback as it seems it isn't usefull 2012-12-16 18:58:52 +01:00
Sébastien Drouyer 0b91727a35 removed unused console log and comments 2012-12-16 18:21:07 +01:00
Sébastien Drouyer 3ed14b2ed0 added tests for the include functionnality 2012-12-16 18:07:02 +01:00
Anatoliy Chakkaev 59f873a4f2 Uncomment tests 2012-12-15 16:06:17 +04:00
Anatoliy Chakkaev d1eb481fce Allow extend tests 2012-12-14 21:44:38 +04:00
Sébastien Drouyer 24ccb0ffc2 added relations key 2012-12-14 16:28:29 +01:00
Anatoliy Chakkaev 100b5322c6 Remove sql adapters and tests 2012-12-14 19:25:32 +04:00
Anatoliy Chakkaev a62aab180d Removed nosql adapters (moved to own repos) 2012-12-14 01:50:02 +04:00
Nicholas Westlake 85535dc955 added nano adapter 2012-12-09 03:13:09 -06:00
Sébastien Drouyer b3d92131b3 limited tests to the one I know 2012-11-03 15:53:29 +01:00
Sébastien Drouyer 7930af6eba trying a fix for redis 2012-11-03 15:35:31 +01:00
Sébastien Drouyer 4c8e4d8e4d fixed regression for postgres 2012-11-03 15:25:15 +01:00
Sébastien Drouyer 36b1d91761 fixed tests for mongodb 2012-11-03 14:48:57 +01:00
Sébastien Drouyer 827d32ec47 fixed issue for sqlite 2012-11-03 13:42:40 +01:00
Sébastien Drouyer 77ead6d123 Merge git://github.com/1602/jugglingdb 2012-11-03 13:34:56 +01:00
Sébastien Drouyer c626587d8f added log to data (TEMPORARY) to debug on travis 2012-11-03 13:19:24 +01:00
Anatoliy Chakkaev 0c24dfa035 Merge pull request #141 from sdrdis/master
Added caching in relationships (+ test cases) (enhanced)
2012-11-02 19:20:09 -07:00
Sébastien Drouyer 89b8329764 add test cases for caching in hasMany and fixed test cases for caching in belongsTo 2012-11-01 01:17:09 +01:00
Sébastien Drouyer 6d8454c5ac added test case for the cache of belongsTo 2012-11-01 00:15:23 +01:00
Anatoliy Chakkaev 8cee0ec9b2 Merge pull request #137 from sdrdis/master
Enhanced inq and nin for mysql and postgres and added test cases
2012-10-28 18:06:54 -07:00
Anatoliy Chakkaev c8322eea31 Fix instanceof checking 2012-10-29 04:05:05 +04:00
Sébastien Drouyer 4c95f1dcad added test cases for IN and NOT IN. Only in mysql and postgres for the moment 2012-10-27 20:51:45 +02:00
Anatoliy Chakkaev da9ff3e1e8 Switch test coverage reporting off for travis 2012-10-14 17:04:24 +04:00
Anatoliy Chakkaev a31a10a5ae Merge branch 'master' of github.com:1602/jugglingdb 2012-10-13 18:26:15 +04:00
Anatoliy Chakkaev 1ec419aa42 Better performance on big datasets read 2012-10-13 17:59:25 +04:00
Mikko Lehtinen 075699ee27 Fix for redis adapter when finding records filtered with multiple attributes 2012-10-09 21:19:38 +03:00
Anatoliy Chakkaev ef93cddf45 Fix memory adapter tests 2012-10-01 12:20:55 +04:00
Anatoliy Chakkaev 451000806d Merge mongoose multisort 2012-09-27 11:24:20 +04:00
Anatoliy Chakkaev b6cecc4b78 Added cradle adapter 2012-09-26 09:18:43 +04:00
Anatoliy Chakkaev 46e65b7e63 Update mysql to 2.0 2012-09-26 08:08:27 +04:00
Anatoliy Chakkaev c8b8012e28 List API improvements 2012-09-11 23:22:55 +04:00
Anatoliy Chakkaev e0f5f45b05 List improvements 2012-09-11 20:51:31 +04:00
Anatoliy Chakkaev e938a814e8 Added typed lists support 2012-09-10 19:57:21 +04:00
Anatoliy Chakkaev 44591111b6 Rewritten redis 2012-09-08 17:03:49 +04:00
Anatoliy Chakkaev cc40d15082 Fix autoupdate for mysql
;
2012-08-20 00:44:15 +04:00
Anatoliy Chakkaev 12eadb80ae Autoupdate multicolumn indexes 2012-08-19 19:40:21 +04:00
Anatoliy Chakkaev 62d0e459c0 Single-column indexes in mysql (autoupdate) 2012-08-17 23:39:22 +04:00
Anatoliy Chakkaev 62178c26c9 Unnecessary error on mongodb authentication. Skip checking 2012-08-17 22:48:14 +04:00
Anatoliy Chakkaev 0defc804c0 Remove JSON serialization test case 2012-08-14 18:47:59 +04:00
Anatoliy Chakkaev efdc4548fc JSON in tests, Schema.JSON published 2012-08-13 10:16:01 +04:00
Anatoliy Chakkaev 7a2e300181 Allow relative driver paths, adopt for node 0.8 2012-07-02 15:59:44 +04:00
Aurélien Thieriot d333fe1d30 First version of a cradle adapter 2012-06-10 16:51:56 +02:00
Anatoliy Chakkaev 2bff27fe2d Fix coding style 2012-06-02 22:42:22 +04:00
Anatoliy Chakkaev 2dae68b5e0 Fix coding style 2012-06-02 22:41:28 +04:00
Anatoliy Chakkaev 418cc03a27 Adopt postgres stuff 2012-06-02 22:33:29 +04:00
Anatoliy Chakkaev 40c9923053 Coverage added to gitignore 2012-05-29 15:16:24 +04:00
Joseph Junker 3dcdb1e911 heavily modified sections of postgres adapter, postgres is now passing all tests 2012-05-16 14:39:43 -07:00
Joseph Junker 61a0795447 ran into some confusion with default values while changing postgres adapter, added postgres default values test 2012-05-16 14:19:25 -07:00
Joseph Junker 97ddbe6b54 migration_test is mysql specific, added postgres migration test 2012-05-16 14:18:11 -07:00
Jonathan Spies 3179c05b95 added multiple sort for mongoose 2012-05-13 23:28:37 -05:00
Anatoliy Chakkaev 7d748e9c02 Upsert with setters 2012-04-19 20:06:38 +04:00
Anatoliy Chakkaev 16a1c21d9c Fix sql adapters 2012-04-19 19:20:10 +04:00
Anatoliy Chakkaev 222b457b3f Setters enabled in new and create 2012-04-19 19:01:40 +04:00
Anatoliy Chakkaev 1b83266fd6 Jslinize if blocks, not strict equal for ids on uniqueness checking 2012-04-19 03:20:44 +04:00
Anatoliy Chakkaev 2ce44db4ba Tune propertyChanged behavior 2012-04-11 23:31:10 +04:00
Anatoliy Chakkaev 6be57cf454 Fix test: not strict equal when comparing ids 2012-04-11 19:52:46 +04:00
Anatoliy Chakkaev df57805b94 Turn off caching 2012-04-11 19:36:10 +04:00
Anatoliy Chakkaev 95c0e7d5d0 upsert for redis 2012-03-23 00:24:15 +04:00
Anatoliy Chakkaev c06f28f433 Support upsert 2012-03-22 23:46:16 +04:00
Anatoliy Chakkaev 4ec9757503 Added contributors, MRU cache cleanup, closes #46 2012-03-16 18:42:02 +04:00
Anatoliy Chakkaev f3e80c28f7 Correctly handle callback after blank automigration 2012-03-11 16:42:07 +04:00
Anatoliy Chakkaev 8bb855c88c Mongodb adapter 2012-03-11 08:48:38 +04:00
Anatoliy Chakkaev 3952c329df Remove sequelize tests 2012-03-10 16:12:17 +04:00
Anatoliy Chakkaev 633ae4067a Remove frozen neo4j lib, add neo4j database setup for travis-ci 2012-03-10 15:56:23 +04:00
Anatoliy Chakkaev d3231e7484 Allow custom table name in mysql 2012-03-07 11:29:08 +04:00
Anatoliy Chakkaev c33bc70756 Support reverse sort for redis 2012-03-06 17:05:22 +04:00
Anatoliy Chakkaev 639820bf29 Model.findOne, mongoose reverse sort, closes #38 2012-03-06 16:46:18 +04:00
Anatoliy Chakkaev 53f39a046a Fix unnecessary _was attributes issue, closes #36, #31, #34, #35 2012-03-03 13:55:29 +04:00
Anatoliy Chakkaev 9b3d432942 Reverse sort order in redis and memory, test 2012-03-01 23:57:48 +04:00
Anatoliy Chakkaev 7f073a4622 Test belongsTo 2012-03-01 21:26:52 +04:00
Anatoliy Chakkaev 35e872368a Default should not be handled by database engine 2012-02-20 22:44:02 +04:00
Anatoliy Chakkaev e8c6f68353 Add schema.isActual and automigrate on sqlite start 2012-02-20 22:33:11 +04:00
Anatoliy Chakkaev 63c3a4c4f2 Remove unnecesare code from test helper 2012-02-04 18:17:27 +04:00
Anatoliy Chakkaev 9434ff4169 Disable advanced queries for redis and memory 2012-02-01 21:36:42 +04:00
Anatoliy Chakkaev fb79ca2bf8 Advanced queries for sql-s and mongodb 2012-02-01 21:33:08 +04:00
Anatoliy Chakkaev 4442b42ace Disable neo4j for travis 2012-01-30 23:45:06 +04:00
Anatoliy Chakkaev 643c2879fe Mongoose order/limit/offset and more
- Lazy dependencies loading
- Travis mongoose inetration
- All tests should run on travis
- Model.count for mongoose
2012-01-30 23:34:30 +04:00
Anatoliy Chakkaev 7a52a7cfb6 SQLite3 adapter 2012-01-30 19:43:45 +04:00
Anatoliy Chakkaev 5b308b846e Fix postgres adapter 2012-01-30 17:54:13 +04:00
Anatoliy Chakkaev f096849a06 Setup postgres for travis 2012-01-30 17:33:45 +04:00
Anatoliy Chakkaev ad7d1d568a Model.count with params support, fix time in mysql 2012-01-30 17:27:26 +04:00
Anatoliy Chakkaev b237b7bd4c Allow to call create without callback 2012-01-27 12:48:37 +04:00
Anatoliy Chakkaev f09bb40035 Adjust test 2012-01-20 00:29:12 +04:00
Anatoliy Chakkaev 01955a9de5 Adjust test 2012-01-20 00:25:50 +04:00