Ghost/core/test/integration/model
Katharina Irrgang e23fd511eb
Use Bookshelf in our test env (#9592)
refs #9601

- replace raw knex queries by Bookshelf queries
- optimise lot's of test setups, so we don't experience a massive slow down in the test run
- this has troubled in the past e.g. with normalisation, any custom model logic - the test env always had to simulate things
- there are for sure thousands things which can be optimised now, but because of time, we do them step by step
- this is especially important for the url service (https://github.com/TryGhost/Ghost/issues/9601), because we have to ensure that inserting/updating/removing resources will trigger model events

`grunt test-all` with SQLite finishes in 2,5-3min. (on master: 1-2min) 
`grunt test-all` with MySQL finishes in 4min. (on master: 3min)

**NOTE: We want to move as much as possible routing and integration tests to unit tests. This will speed up the test run again.** See #9342. But we need to find time for that. Any help is welcome!
2018-04-25 17:13:35 +02:00
..
base Update Notification improvements (#9123) 2018-01-09 15:20:00 +01:00
model_accesstoken_spec.js Use Bookshelf in our test env (#9592) 2018-04-25 17:13:35 +02:00
model_app-fields_spec.js Use Bookshelf in our test env (#9592) 2018-04-25 17:13:35 +02:00
model_app-settings_spec.js Use Bookshelf in our test env (#9592) 2018-04-25 17:13:35 +02:00
model_apps_spec.js Use Bookshelf in our test env (#9592) 2018-04-25 17:13:35 +02:00
model_invite_spec.js 💄 🐷 Test consistency (#8199) 2017-03-21 09:24:11 +01:00
model_permissions_spec.js Use Bookshelf in our test env (#9592) 2018-04-25 17:13:35 +02:00
model_posts_spec.js Use Bookshelf in our test env (#9592) 2018-04-25 17:13:35 +02:00
model_roles_spec.js 💄 🐷 Test consistency (#8199) 2017-03-21 09:24:11 +01:00
model_settings_spec.js Import lib/common only 2017-12-12 10:28:13 +01:00
model_tags_spec.js Use Bookshelf in our test env (#9592) 2018-04-25 17:13:35 +02:00
model_users_spec.js Removed isNew usages in model layer 2018-02-15 22:11:49 +01:00