mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-04-08 02:52:39 -05:00
Fixed settings tests
refs 8a817050c5
- This change reflects field reshuffle done in referenced commit
- NOTE: removed `members_email_auth_secret` key from respnse body validation as it seems like it should never have been exposed in the first place! This needs verification as it's a breaking change theretically
This commit is contained in:
parent
8ea245fc7c
commit
b00369ac67
3 changed files with 18 additions and 21 deletions
|
@ -16,16 +16,12 @@ const defaultSettingsKeys = [
|
|||
'icon',
|
||||
'lang',
|
||||
'timezone',
|
||||
'amp',
|
||||
'codeinjection_head',
|
||||
'codeinjection_foot',
|
||||
'facebook',
|
||||
'twitter',
|
||||
'labs',
|
||||
'navigation',
|
||||
'secondary_navigation',
|
||||
'slack',
|
||||
'unsplash',
|
||||
'meta_title',
|
||||
'meta_description',
|
||||
'og_image',
|
||||
|
@ -34,12 +30,10 @@ const defaultSettingsKeys = [
|
|||
'twitter_image',
|
||||
'twitter_title',
|
||||
'twitter_description',
|
||||
'shared_views',
|
||||
'active_theme',
|
||||
'is_private',
|
||||
'password',
|
||||
'public_hash',
|
||||
'members_email_auth_secret',
|
||||
'default_content_visibility',
|
||||
'members_subscription_settings',
|
||||
'stripe_connect_integration',
|
||||
|
@ -47,6 +41,11 @@ const defaultSettingsKeys = [
|
|||
'portal_button',
|
||||
'portal_plans',
|
||||
'bulk_email_settings',
|
||||
'amp',
|
||||
'labs',
|
||||
'slack',
|
||||
'unsplash',
|
||||
'shared_views',
|
||||
'active_timezone',
|
||||
'default_locale'
|
||||
];
|
||||
|
@ -83,7 +82,7 @@ describe('Settings API (canary)', function () {
|
|||
jsonResponse.settings.should.be.an.Object();
|
||||
const settings = jsonResponse.settings;
|
||||
|
||||
Object.keys(settings).length.should.equal(40);
|
||||
Object.keys(settings).length.should.equal(39);
|
||||
settings.map(s => s.key).should.deepEqual(defaultSettingsKeys);
|
||||
|
||||
localUtils.API.checkResponse(jsonResponse, 'settings');
|
||||
|
|
|
@ -13,16 +13,12 @@ const defaultSettingsKeys = [
|
|||
'logo',
|
||||
'cover_image',
|
||||
'icon',
|
||||
'amp',
|
||||
'codeinjection_head',
|
||||
'codeinjection_foot',
|
||||
'facebook',
|
||||
'twitter',
|
||||
'labs',
|
||||
'navigation',
|
||||
'secondary_navigation',
|
||||
'slack',
|
||||
'unsplash',
|
||||
'meta_title',
|
||||
'meta_description',
|
||||
'og_image',
|
||||
|
@ -31,12 +27,10 @@ const defaultSettingsKeys = [
|
|||
'twitter_image',
|
||||
'twitter_title',
|
||||
'twitter_description',
|
||||
'shared_views',
|
||||
'active_theme',
|
||||
'is_private',
|
||||
'password',
|
||||
'public_hash',
|
||||
'members_email_auth_secret',
|
||||
'default_content_visibility',
|
||||
'members_subscription_settings',
|
||||
'stripe_connect_integration',
|
||||
|
@ -44,6 +38,11 @@ const defaultSettingsKeys = [
|
|||
'portal_button',
|
||||
'portal_plans',
|
||||
'bulk_email_settings',
|
||||
'amp',
|
||||
'labs',
|
||||
'slack',
|
||||
'unsplash',
|
||||
'shared_views',
|
||||
'ghost_head',
|
||||
'ghost_foot',
|
||||
'active_timezone',
|
||||
|
@ -91,7 +90,7 @@ describe('Settings API (v2)', function () {
|
|||
jsonResponse.settings.should.be.an.Object();
|
||||
const settings = jsonResponse.settings;
|
||||
|
||||
Object.keys(settings).length.should.equal(40);
|
||||
Object.keys(settings).length.should.equal(39);
|
||||
settings.map(s => s.key).should.deepEqual(defaultSettingsKeys);
|
||||
|
||||
localUtils.API.checkResponse(jsonResponse, 'settings');
|
||||
|
|
|
@ -16,16 +16,12 @@ const defaultSettingsKeys = [
|
|||
'icon',
|
||||
'lang',
|
||||
'timezone',
|
||||
'amp',
|
||||
'codeinjection_head',
|
||||
'codeinjection_foot',
|
||||
'facebook',
|
||||
'twitter',
|
||||
'labs',
|
||||
'navigation',
|
||||
'secondary_navigation',
|
||||
'slack',
|
||||
'unsplash',
|
||||
'meta_title',
|
||||
'meta_description',
|
||||
'og_image',
|
||||
|
@ -34,12 +30,10 @@ const defaultSettingsKeys = [
|
|||
'twitter_image',
|
||||
'twitter_title',
|
||||
'twitter_description',
|
||||
'shared_views',
|
||||
'active_theme',
|
||||
'is_private',
|
||||
'password',
|
||||
'public_hash',
|
||||
'members_email_auth_secret',
|
||||
'default_content_visibility',
|
||||
'members_subscription_settings',
|
||||
'stripe_connect_integration',
|
||||
|
@ -47,6 +41,11 @@ const defaultSettingsKeys = [
|
|||
'portal_button',
|
||||
'portal_plans',
|
||||
'bulk_email_settings',
|
||||
'amp',
|
||||
'labs',
|
||||
'slack',
|
||||
'unsplash',
|
||||
'shared_views',
|
||||
'active_timezone',
|
||||
'default_locale'
|
||||
];
|
||||
|
@ -81,7 +80,7 @@ describe('Settings API (v3)', function () {
|
|||
jsonResponse.settings.should.be.an.Object();
|
||||
const settings = jsonResponse.settings;
|
||||
|
||||
Object.keys(settings).length.should.equal(40);
|
||||
Object.keys(settings).length.should.equal(39);
|
||||
settings.map(s => s.key).should.deepEqual(defaultSettingsKeys);
|
||||
|
||||
localUtils.API.checkResponse(jsonResponse, 'settings');
|
||||
|
|
Loading…
Add table
Reference in a new issue