Ghost/core/test/unit
Katharina Irrgang 869a35c97d migrations: seeding is part of init db task (#7545)
* 🎨  move heart of fixtures to schema folder and change user model

- add fixtures.json to schema folder
- add fixture utils to schema folder
- keep all the logic!

--> FIXTURE.JSON
- add owner user with roles

--> USER MODEL
- add password as default
- findAll: allow querying inactive users when internal context (defaultFilters)
- findOne: do not remove values from original object!
- add: do not remove values from original object!

* 🔥  remove migrations key from default_settings.json

- this was a temporary invention for an older migration script
- sephiroth keep alls needed information in a migration collection

* 🔥   add code property to errors

- add code property to errors
- IMPORTANT: please share your opinion about that
- this is a copy paste behaviour of how node is doing that (errno, code etc.)
- so code specifies a GhostError

* 🎨  change error handling in versioning

- no need to throw specific database errors anymore (this was just a temporary solution)
- now: we are throwing real DatabaseVersionErrors
- specified by a code
- background: the versioning unit has not idea about seeding and population of the database
- it just throws what it knows --> database version does not exist or settings table does not exist

* 🎨  sephiroth optimisations

- added getPath function to get the path to init scripts and migration scripts
- migrationPath is still hardcoded (see TODO)
- tidy up database naming to transacting

*   migration init scripts are now complete

- 1. add tables
- 2. add fixtures
- 3. add default settings

* 🎨  important: make bootup script smaller!

- remove all TODO'S except of one
- no seeding logic in bootup script anymore 🕵🏻

*   sephiroth: allow params for init command

- param: skip (do not run this script)
- param: only (only run this script)
- very simple way

* 🎨  adapt tests and test env

- do not use migrate.populate anymore
- use sephiroth instead
- jscs/jshint

* 🎨  fix User model status checks
2016-10-12 16:18:57 +01:00
..
api 🎨 change how we get and set config 2016-09-20 15:59:34 +01:00
auth 🎨 Ghost OAuth improvements (#7550) 2016-10-12 12:11:56 +01:00
controllers/frontend Move internal tags out of labs (#7519) 2016-10-10 09:51:03 +01:00
logging 🐛 logging: error output format (#7546) 2016-10-11 19:03:14 +01:00
mail 🎨 Use GhostAuth name and example emails (#7475) 2016-10-03 15:11:43 +01:00
metadata Move internal tags out of labs (#7519) 2016-10-10 09:51:03 +01:00
middleware 🎉 Middleware refactor: Give the API its own express App (#7537) 2016-10-11 10:36:00 +02:00
models/base improvement: jshint/jscs 2016-06-17 22:59:47 +02:00
models_plugins change default order of posts (#7096) 2016-07-15 11:04:10 +01:00
scheduling Error creation (#7477) 2016-10-06 13:27:35 +01:00
server_helpers 🔥 Remove the deprecated body classes (#7510) 2016-10-10 11:38:12 +02:00
sitemap 🎨 source out url utils from ConfigManager (#7347) 2016-09-20 15:59:34 +01:00
storage Error creation (#7477) 2016-10-06 13:27:35 +01:00
utils 🎨 Use GhostAuth name and example emails (#7475) 2016-10-03 15:11:43 +01:00
api_utils_spec.js 🎨 configurable logging with bunyan (#7431) 2016-10-04 16:33:43 +01:00
apps_filters_spec.js improvement: jshint/jscs 2016-06-17 22:59:47 +02:00
apps_spec.js improvement: jshint/jscs 2016-06-17 22:59:47 +02:00
config_spec.js 🎨 replace process.env.NODE_ENV usages by config.get('env') (#7544) 2016-10-11 13:53:52 +01:00
errors_spec.js 🎨 optimise error to inherit from in GhostError prototype (#7529) 2016-10-10 18:30:30 +01:00
exporter_spec.js Error creation (#7477) 2016-10-06 13:27:35 +01:00
filters_spec.js improvement: jshint/jscs 2016-06-17 22:59:47 +02:00
ghost_url_spec.js 🎨 source out url utils from ConfigManager (#7347) 2016-09-20 15:59:34 +01:00
importer_spec.js feature: upload validation middleware (#7208) 2016-08-18 20:25:51 +01:00
migration_fixture_utils_spec.js 🎨 Separate invites from user 2016-09-26 11:08:43 +02:00
migration_spec.js use migration runner for init db (#7502) 2016-10-11 13:37:11 +01:00
permissions_spec.js 🎨 configurable logging with bunyan (#7431) 2016-10-04 16:33:43 +01:00
rss_spec.js Move internal tags out of labs (#7519) 2016-10-10 09:51:03 +01:00
server_helpers_index_spec.js improvement: jshint/jscs 2016-06-17 22:59:47 +02:00
server_helpers_template_spec.js improvement: jshint/jscs 2016-06-17 22:59:47 +02:00
server_spec.js migrations: seeding is part of init db task (#7545) 2016-10-12 16:18:57 +01:00
server_utils_spec.js 🎨 replace process.env.NODE_ENV usages by config.get('env') (#7544) 2016-10-11 13:53:52 +01:00
showdown_client_integrated_spec.js improvement: jshint/jscs 2016-06-17 22:59:47 +02:00
slack_spec.js 🎨 source out url utils from ConfigManager (#7347) 2016-09-20 15:59:34 +01:00
social-urls_spec.js improvement: jshint/jscs 2016-06-17 22:59:47 +02:00
utils_pipeline_spec.js Update mocha to version 3.0.2 🚀 (#7165) 2016-08-11 08:51:19 +01:00
versioning_spec.js migrations: seeding is part of init db task (#7545) 2016-10-12 16:18:57 +01:00
xmlrpc_spec.js 🎨 replace process.env.NODE_ENV usages by config.get('env') (#7544) 2016-10-11 13:53:52 +01:00