mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-21 09:52:06 +03:00
abda6e6338
closes #10773 - The refactoring is a substitute for `urlService.utils` used previously throughout the codebase and now extracted into the separate module in Ghost-SDK - Added url-utils stubbing utility for test suites - Some tests had to be refactored to avoid double mocks (when url's are being reset inside of rested 'describe' groups)
21 lines
491 B
JavaScript
21 lines
491 B
JavaScript
const ghostVersion = require('../../lib/ghost-version');
|
|
const settingsCache = require('../../services/settings/cache');
|
|
const urlUtils = require('../../lib/url-utils');
|
|
|
|
const site = {
|
|
docName: 'site',
|
|
|
|
read: {
|
|
permissions: false,
|
|
query() {
|
|
return {
|
|
title: settingsCache.get('title'),
|
|
url: urlUtils.urlFor('home', true),
|
|
version: ghostVersion.safe
|
|
};
|
|
}
|
|
}
|
|
};
|
|
|
|
module.exports = site;
|