Ghost/core/test/integration
Katharina Irrgang 9349e99e54 🐛 fix delete by author as transaction (#7145)
closes #7137

Deleting the content from the database runs in a transaction. see
https://github.com/TryGhost/Ghost/blob/master/core/server/api/users.js#L390

`destroyByAuthor` is one of the operations we trigger to delete all the conent, see https://github.com/TryGhost/Ghost/blob/master/core/server/models/post.js#L647

The post model has a specific hook for deleting content to delete the relations as well, see https://github.com/TryGhost/Ghost/blob/master/core/server/models/post.js#L122

This hook is part of the transaction. But the `options` are ignored. `(model/*, attr, options*/)` 
We use the `options` to forward the transaction reference, which we need to pass into the bookshelf queries. So `return model.load('tags').call('related', 'tags').call('detach')` does not forward the transaction and that's why it stucks when deleting the content.
2016-09-19 14:45:36 +01:00
..
api 🐛 fix delete by author as transaction (#7145) 2016-09-19 14:45:36 +01:00
model Update mocha to version 3.0.2 🚀 (#7165) 2016-08-11 08:51:19 +01:00
export_spec.js feature: maintenance mode (#7019) 2016-07-15 17:22:41 +01:00
import_spec.js feature: maintenance mode (#7019) 2016-07-15 17:22:41 +01:00
migration_spec.js feature: theme upload/download/delete (#7209) 2016-08-23 13:07:25 +01:00
update_check_spec.js Support for custom notifications (#7077) 2016-07-22 14:02:10 +01:00