mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-27 22:49:56 -05:00
Removed apiVersions from test urlUtils
refs: https://github.com/TryGhost/Toolbox/issues/229 - These properties were removed from urlUtils in 5.0 and no longer do anything
This commit is contained in:
parent
08b099e527
commit
b0234dd58e
2 changed files with 3 additions and 13 deletions
|
@ -20,14 +20,6 @@ function createUrlUtilsMock() {
|
|||
getSubdir: configUtils.config.getSubdir,
|
||||
getSiteUrl: configUtils.config.getSiteUrl,
|
||||
getAdminUrl: configUtils.config.getAdminUrl,
|
||||
apiVersions: {
|
||||
all: ['canary'],
|
||||
canary: {
|
||||
admin: 'admin',
|
||||
content: 'content'
|
||||
}
|
||||
},
|
||||
defaultApiVersion: 'canary',
|
||||
slugs: ['ghost', 'rss', 'amp'],
|
||||
redirectCacheMaxAge: 31536000,
|
||||
baseApiPath: '/ghost/api'
|
||||
|
@ -55,7 +47,7 @@ describe('Stripe - config', function () {
|
|||
getActiveStripeKeys: sinon.stub().returns(null)
|
||||
};
|
||||
const config = getConfig({settingsHelpers, config: configUtils.config, urlUtils: {}});
|
||||
|
||||
|
||||
should.equal(config, null);
|
||||
});
|
||||
|
||||
|
@ -67,11 +59,11 @@ describe('Stripe - config', function () {
|
|||
const fakeUrlUtils = createUrlUtilsMock();
|
||||
|
||||
const config = getConfig({settingsHelpers, config: configUtils.config, urlUtils: fakeUrlUtils});
|
||||
|
||||
|
||||
should.equal(config.secretKey, 'direct_secret');
|
||||
should.equal(config.publicKey, 'direct_publishable');
|
||||
should.equal(config.webhookHandlerUrl, 'http://site.com/subdir/members/webhooks/stripe/');
|
||||
|
||||
|
||||
should.exist(config.checkoutSessionSuccessUrl);
|
||||
should.exist(config.checkoutSessionCancelUrl);
|
||||
should.exist(config.checkoutSetupSessionSuccessUrl);
|
||||
|
|
|
@ -12,8 +12,6 @@ const getInstance = (options) => {
|
|||
getSubdir: config.getSubdir,
|
||||
getSiteUrl: config.getSiteUrl,
|
||||
getAdminUrl: config.getAdminUrl,
|
||||
apiVersions: options.apiVersions,
|
||||
defaultApiVersion: 'canary',
|
||||
slugs: options.slugs,
|
||||
redirectCacheMaxAge: options.redirectCacheMaxAge,
|
||||
baseApiPath: '/ghost/api'
|
||||
|
|
Loading…
Add table
Reference in a new issue