0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-24 23:48:13 -05:00
ghost/core/test
kirrg001 c8f2dd11ba Fixed post.unpublished when deleting all content
no issue

- if you delete all content, we expect two events
  - `post.deleted` and `post.unpublished`
- `post.unpublished` was never triggered, because the api implementation made use of `collection.invoke(`destroy`)`
- what happened?
  - you fetch all posts (columns:id)
  - you destroy the post (only id column is available)
  - the model events are triggered
  - but you have no access to a default set of data
  - the result is that the event handler can't even tell if this is a post or a page
- added a proper test to ensure which events are triggered
2018-04-06 15:49:25 +02:00
..
functional Multiple authors (#9426) 2018-03-27 15:16:15 +01:00
integration Fixed post.unpublished when deleting all content 2018-04-06 15:49:25 +02:00
unit Added a post unit test to proof a bug 2018-04-06 13:36:03 +02:00
utils Extended our knex mock to only return specific fields/columns 2018-04-06 13:35:38 +02:00
.eslintrc.json ESlint rule: no-multiple-empty-lines 2017-11-06 10:12:18 +00:00
.jshintrc