mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-10 23:36:14 -05:00
Fixed config utils to return a usable instance of config
no issue - It's sometimes needed to use the config uitl intance directly in the test. For example, like it's used in the update check tests
This commit is contained in:
parent
3173603d96
commit
64e8d0287d
1 changed files with 4 additions and 1 deletions
|
@ -36,6 +36,8 @@ const stubUrlUtils = (options, sandbox) => {
|
|||
});
|
||||
}
|
||||
});
|
||||
|
||||
return stubInstance;
|
||||
};
|
||||
|
||||
// Method for regressions tests must be used with restore method
|
||||
|
@ -49,7 +51,8 @@ const stubUrlUtilsFromConfig = () => {
|
|||
redirectCacheMaxAge: config.get('caching:301:maxAge'),
|
||||
baseApiPath: '/ghost/api'
|
||||
};
|
||||
stubUrlUtils(options, defaultSandbox);
|
||||
|
||||
return stubUrlUtils(options, defaultSandbox);
|
||||
};
|
||||
|
||||
const restore = () => {
|
||||
|
|
Loading…
Add table
Reference in a new issue