Ghost/test/api-acceptance
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
..
admin Fixed __GHOST_URL__ appearing in settings values after edit (#12738) 2021-03-08 18:41:43 +00:00
content Added 'locale' property to public settings 2021-03-04 16:00:02 +13:00
README.md Updated acceptance&regression test suite readmes 2021-01-22 16:42:02 +13:00

Acceptance Tests

This folder should only contain a set of basic API use cases.

The goal for acceptance tests is to keep test cases to basic usecases e.g. upload an image, schedule a post, download a theme. Otherwise tests should be written as a part of regression test suite.

Future improvement notes:

  • We probably need a differentiation for the acceptance tests for session and api_key authentication.