0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-27 22:49:56 -05:00
ghost/core/test/utils
Hannah Wolfe b2659d0cbb Refactor & test fixture migrations
refs #6301

Fixtures:
- Removed all the old (and now broken) 003 fixture upgrades
- Split the 004 fixture upgrade tasks out, each into their own file
- Improved the versioning code that figured out which upgrades we should do
- Added lots of test coverage to make sure all the fixtures are still being run correctly.

Permissions fixtures:
- Changed the code that was populating permissions fixtures to be more automated & based only on what is in the permissions.json file.
- Added lots of test coverage to make sure all the permissions are still being created correctly.

Merging the two things:
- Merged the content of permissions.json and fixtures.json into fixtures.json, but using the new structure from permissions.json.
- Changed to use the new automated model & relation creation for all fixtures, not just permissions.
- The only thing that can't be auto-populated just now is the owner creation, I think that's important enough to do separately.
- There were (so far) never any permission updates, so code for updating fixtures stays the same through the merge.
- This results in two clear code paths: populate (fill out a brand new DB) and update (make any changes since the last version)

Test coverage is now 100% across both updates and populations.
2016-03-03 09:03:37 +00:00
..
fixtures Move db connection out of config 2016-02-12 13:56:23 +00:00
jscs-rules Fix typo in disallow-object-controller 2015-01-13 22:13:26 +07:00
api.js Restructure Configuration API endpoint 2016-02-19 18:49:23 +00:00
configUtils.js Unify usage of config in unit tests 2015-12-15 10:48:24 +00:00
fork.js Fix client.secret for new installs 2015-09-25 21:03:33 +02:00
index.js Refactor & test fixture migrations 2016-03-03 09:03:37 +00:00
tempfile.js Add readThemes() utility to get a list of themes 2015-10-13 15:54:41 +02:00