Commit Graph

59 Commits

Author SHA1 Message Date
Blade Barringer
c2ba90afcc tests(fix): Add return to expect promise in create task test 2015-12-04 09:13:50 -06:00
Matteo Pagliazzi
a6648fc638 add tags routes, misc fixes 2015-12-03 19:19:53 +01:00
Matteo Pagliazzi
c0a99eec8b fix user model, sanitize some fields on task creation, add some tests and comments 2015-12-03 18:15:22 +01:00
Matteo Pagliazzi
506609cc29 starts writing tests for tasks, fix errors in auth middleware and tasks methods 2015-12-03 17:48:32 +01:00
Matteo Pagliazzi
427c805ea5 fix user tests and misc changes 2015-12-02 11:22:53 +01:00
Matteo Pagliazzi
3002db3d75 add ability to update tasks, can pass additional fields to Model.sanitize at runtime 2015-11-29 19:05:24 +01:00
Matteo Pagliazzi
d67836ee1f allow for additional transform functions for toJSON and sanitize 2015-11-25 15:42:29 +01:00
Matteo Pagliazzi
94fc1c9bef baseModel: delete properties instead of setting them to undefined, transform toJSON only not toObject 2015-11-25 15:19:21 +01:00
Matteo Pagliazzi
3f1faf113e add baseModel plugin with some tests 2015-11-24 18:51:48 +01:00
Matteo Pagliazzi
1bf91030c6 format express-validator errors 2015-11-23 21:34:21 +01:00
Matteo Pagliazzi
4a941deece remove success field from json responses 2015-11-23 21:04:21 +01:00
Matteo Pagliazzi
645095e58f fix errorHandler tests, add tests for res.respond 2015-11-23 13:28:25 +01:00
Matteo Pagliazzi
349122c9a1 add res.respond, fix linting 2015-11-23 13:01:47 +01:00
Matteo Pagliazzi
a26f713e18 misc fixes, add ability to attach local auth to social user 2015-11-23 12:47:15 +01:00
Blade Barringer
78cdc1753f tests(api): Add test for registering with an invalid email 2015-11-21 13:52:09 -06:00
Blade Barringer
49e7799baa tests(api): clean up code style of test file 2015-11-21 13:51:31 -06:00
Matteo Pagliazzi
5c33a404fb handle mongoose validation errors, fix bug in import and add more tests for errors 2015-11-21 15:00:31 +01:00
Matteo Pagliazzi
afbfbdd01c fix mongoose promise, some user validation, tests urls 2015-11-21 14:27:24 +01:00
Matteo Pagliazzi
3608742e20 fix bugs on user controller 2015-11-21 12:26:48 +01:00
Matteo Pagliazzi
2f4e6e015a Merge branch 'api-v3-user' of github.com:HabitRPG/habitrpg into api-v3-user 2015-11-21 12:03:26 +01:00
Matteo Pagliazzi
7866f7393b clean up code, add deleteSocial method 2015-11-21 12:03:08 +01:00
Blade Barringer
07247033b2 test: Add integration test for POST user/register/local 2015-11-20 19:14:07 -06:00
Matteo Pagliazzi
dd8c22584d req.t --> res.t 2015-11-19 12:17:44 +01:00
Matteo Pagliazzi
5c859ca52e add req.t in place of i18n.t passing req.language, begins implementing user signup 2015-11-18 22:04:36 +01:00
Blade Barringer
f95c6ef927 Move notFound api v3 test to integration folder. 2015-11-18 13:01:35 -06:00
Matteo Pagliazzi
3b633a87b9 try fixing the notFound test 2015-11-18 12:44:52 +01:00
Matteo Pagliazzi
65a8d2e255 misc fixes and improvements, starts adding route tests 2015-11-18 12:36:13 +01:00
Matteo Pagliazzi
2a51117d21 comment errors according to apidoc, add new tests and fix existing ones 2015-11-17 19:22:47 +01:00
Matteo Pagliazzi
aa1b046cf2 add example apidoc comments, add notFound middleware 2015-11-17 16:48:50 +01:00
Matteo Pagliazzi
83eb2308fb Merge pull request #6232 from HabitRPG/api-v3-utils
[API v3] Port Utils
2015-11-15 20:01:48 +01:00
Matteo Pagliazzi
78e5d913f5 update test to match possible html string 2015-11-15 17:27:22 +01:00
Matteo Pagliazzi
a80be380f9 add txt emails tests 2015-11-14 18:58:33 +01:00
Matteo Pagliazzi
a8b3780cc0 add send email tests 2015-11-14 18:13:17 +01:00
Matteo Pagliazzi
3b75fe6ade add tests for emails (wip) and encryption, misc fixes 2015-11-14 17:43:56 +01:00
Matteo Pagliazzi
466797cc6c add some basic tests 2015-11-14 15:50:57 +01:00
Blade Barringer
4cd4c588a8 Add tests for browser selection of language and refactor 2015-11-13 18:22:20 -06:00
Blade Barringer
43058f1642 Add queries for which req pieces take precedence. 2015-11-13 18:22:17 -06:00
Blade Barringer
500c520c59 Move sandbox stub to test that uses it 2015-11-13 18:22:16 -06:00
Blade Barringer
49a6a7167b Merge branch 'api-v3' into api-v3-i18n 2015-11-13 10:49:21 -06:00
Blade Barringer
c6f059c1df Move delete cacth to afterEach 2015-11-13 10:40:31 -06:00
Blade Barringer
6bb107f9e0 Set up analytics middleware to test prod and non prod behavior. 2015-11-13 10:35:58 -06:00
Blade Barringer
810a818334 Add headers to req generator and unpend failing test. 2015-11-13 09:36:18 -06:00
Blade Barringer
a6a9c3c74f Use context blocks instead of describe blocks. 2015-11-13 09:27:17 -06:00
Blade Barringer
db67451a38 Add done callback to test. 2015-11-13 09:24:03 -06:00
Blade Barringer
939bc893c6 Correct test to check req status after function is finished. 2015-11-13 09:21:22 -06:00
Blade Barringer
eab9d7b3ba Reorganize i18n tests. 2015-11-13 09:15:11 -06:00
Matteo Pagliazzi
60b51b8862 Merge branch 'api-v3' into api-v3-i18n 2015-11-12 16:36:19 +01:00
Matteo Pagliazzi
4af8a8f7aa add tests for i18n and getUserLanguage 2015-11-12 16:24:08 +01:00
Blade Barringer
a18c2f7444 Port v2 webhook lib to v3 2015-11-12 09:03:28 -06:00
Blade Barringer
533440ce55 Merge pull request #6214 from HabitRPG/api-v3-add-password-tests
Add tests for password utilities
2015-11-11 19:43:50 -06:00