Ghost/core/test/integration/model
Katharina Irrgang dfd4afea19 Add bookshelf-relations (#9252)
no issue

- added https://github.com/TryGhost/bookshelf-relations as dependency
- remove existing tag handling

--- 

* Important: Ensure we trigger parent initialize function

- otherwise the plugin is unable to listen on model events
- important: event order for listeners is Ghost -> Plugin
- Ghost should be able to listen on the events as first instance
- e.g. be able to modify/validate relationships

* Fix tag validation

- we detect lower/update case slugs for tags manually
- this can't be taken over from the plugin obviously
- ensure we update the target model e.g. this.set('tags', ...)

* override base fn: `permittedAttributes`

- ensure we call the base
- put relations on top
- each relation is allowed to be passed
- the plugin will auto-unset any relations to it does not reach the database

* Ensure we run add/edit/delete within a transaction

- updating nested relationships requires sql queries
- all sql statements have to run in a single transaction to ensure we rollback everything if an error occurs
- use es6
2017-11-21 13:28:05 +00:00
..
base Fixed moment warnings for listeners_spec 2017-11-14 14:07:07 +01:00
model_accesstoken_spec.js 💄 🐷 Test consistency (#8199) 2017-03-21 09:24:11 +01:00
model_app-fields_spec.js 💄 🐷 Test consistency (#8199) 2017-03-21 09:24:11 +01:00
model_app-settings_spec.js 💄 🐷 Test consistency (#8199) 2017-03-21 09:24:11 +01:00
model_apps_spec.js 💄 🐷 Test consistency (#8199) 2017-03-21 09:24:11 +01:00
model_invite_spec.js 💄 🐷 Test consistency (#8199) 2017-03-21 09:24:11 +01:00
model_permissions_spec.js 💄 🐷 Test consistency (#8199) 2017-03-21 09:24:11 +01:00
model_posts_spec.js Add bookshelf-relations (#9252) 2017-11-21 13:28:05 +00:00
model_roles_spec.js 💄 🐷 Test consistency (#8199) 2017-03-21 09:24:11 +01:00
model_settings_spec.js Site description fixture update (#8763) 2017-07-27 12:26:31 +04:00
model_tags_spec.js 💄 🐷 Test consistency (#8199) 2017-03-21 09:24:11 +01:00
model_users_spec.js Improved password validation rules (#9171) 2017-10-26 11:01:24 +01:00