0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-10 23:36:14 -05:00
ghost/test/unit
Fabien 'egg' O'Carroll 15978689c0
Added default value to accent_color setting (#12743)
refs TryGhost/Team#535

We want to ensure that a site will always have a default value of
`'#15171A'` for the accent_color setting.

Since the boot process changed we have three cases to account for:

1. Setting does not exist
2. Setting exists with no value
3. Setting exists with a value

It is only in the case of 2. that we want the migration to update the
database with a default value.

In the case of 3. the site owner has already set a value, which we do
not want to override.

In the case of 1. the setting will be created (and populated with
default value) from the default-settings.json file, by the
populateDefaults method called from the settings service

We also update the accent_color setting to include a non-empty
validation, to ensure that the setting will always have a value, as
sites before 4.x may have an empty accent_color, we must update the
importer to set the default value if one is not present. Otherwise we
would run into validation errors and even if we didn't would have an
invalid database state.
2021-03-09 16:15:10 +00:00
..
adapters Fixed "no-shadow" eslint warning in tests 2020-10-19 17:45:26 +13:00
api 🏗 Changed internal URL storage format to use __GHOST_URL__ (#12731) 2021-03-05 13:54:01 +00:00
apps Fixed AMP URLs not being transformed to absolute (#12737) 2021-03-06 09:43:50 +00:00
data Added default value to accent_color setting (#12743) 2021-03-09 16:15:10 +00:00
helpers Updated default format for date helper to locale-based date string (#12733) 2021-03-05 13:35:31 +00:00
lib Updated mobiledoc tests for lazy loaded images (#12672) 2021-02-18 19:49:40 +00:00
models Fixed __GHOST_URL__ appearing in settings values after edit (#12738) 2021-03-08 18:41:43 +00:00
server Moved notify out of GhostServer 2021-02-19 20:22:56 +00:00
services 🏗 Changed internal URL storage format to use __GHOST_URL__ (#12731) 2021-03-05 13:54:01 +00:00
shared/config Updated tests locations and added linting of core/shared (#11872) 2020-06-01 22:06:50 +01:00
web Pointed the v3 unit tests to the actual v3 code 2021-01-22 16:32:03 +13:00