Ghost/test/regression
Kevin Ansfield 021cfecb59
Fixed __GHOST_URL__ appearing in settings values after edit (#12738)
refs https://github.com/TryGhost/Ghost/pull/12736
refs https://github.com/TryGhost/Team/issues/467

knex's `parse()` method is only called on data when directly fetched from the db. This was causing problems when model instances are passed around via events for example because `.get('key')` will return data that was directly set on the model without having gone through the `parse()` transformations. The result of this inconsistency was settings appearing correct when Ghost started up but then being broken as soon as a setting was changed.

- moved absolute/relative->transform-ready URL transformations from the API input serializers to the model's `format()` method and replaced with a relative->absolute transform in API input serializers
    - results in consistency because `.get()` on a settings model will always return an URL
- removed transform-ready->absolute transforms from the API output serializers as that is now handled at the model-layer
2021-03-08 18:41:43 +00:00
..
api Fixed __GHOST_URL__ appearing in settings values after edit (#12738) 2021-03-08 18:41:43 +00:00
exporter Updated var declarations to const/let and no lists 2020-04-29 16:51:13 +01:00
importer Updated mobiledoc tests for lazy loaded images (#12672) 2021-02-18 19:49:40 +00:00
migrations Added snippets permissions migration and fixtures (#12283) 2020-10-16 12:53:09 +01:00
models 🏗 Changed internal URL storage format to use __GHOST_URL__ (#12731) 2021-03-05 13:54:01 +00:00
settings Added routes_hash setting (#12171) 2020-09-07 21:54:55 +12:00
site Hardened frontend tests checking API engine 2021-02-24 18:55:12 +13:00
update-check Fixed linting error 2021-01-14 18:39:27 +13:00
README.md Updated acceptance&regression test suite readmes 2021-01-22 16:42:02 +13:00

Regression Tests

These tests should ensure that we don't break Ghost for all available APIs.

The goal is that most of these packages use Ghost's API's to test behaviours, otherwise transform the tests into unit tests.