Ghost/test
Kevin Ansfield 8a17e723a1 Moved usage of preview options from globalTemplateOptions to localTemplateOptions
refs https://github.com/TryGhost/Team/issues/1097

globalTemplateOptions are supposed to be static with localTemplateOptions being merged in per-request, however the per-request preview data was being extracted and set in the global options. Comments suggest that the global data should be static and eventually updated via other means, the usage of the request object to get per-request preview data is working against that.

- adjusted the preview handler to return an object rather than changing properties by reference on a passed in object
- moved preview data fetching out of `getSiteData()` used in `updateGlobalTemplateOptions()` and into `updateLocalTemplateOptions()` so that we're not relying on the request object in `updateGlobalTemplateOptions()`
2021-09-30 12:12:55 +01:00
..
api-acceptance Removed method complexity in integrations API controller 2021-09-16 14:23:48 +03:00
frontend-acceptance Added /email/ route to robots.txt 2021-08-10 13:45:53 +04:00
regression Made custom-redirects middleware testable 2021-09-28 22:00:32 +02:00
unit Moved usage of preview options from globalTemplateOptions to localTemplateOptions 2021-09-30 12:12:55 +01:00
utils Moved route settings initialization to backend 2021-09-28 04:59:41 +13:00
.eslintignore Move tests from core to root (#11700) 2020-03-30 16:26:47 +01:00
.eslintrc.js Upgraded no-skipped-test rule to error 2021-05-26 14:57:43 +01:00
.jshintrc Move tests from core to root (#11700) 2020-03-30 16:26:47 +01:00