mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
Updated tests that were stubbing old ghost_head/ghost_foot settings keys
refs https://github.com/TryGhost/Ghost/issues/10318
refs 9d7665bb43
- broken helpers weren't picked up previously because the tests were stubbing the old keys
- once the helpers were fixed the tests started failing because they weren't stubbing the new key
This commit is contained in:
parent
9d7665bb43
commit
ec6a46a183
2 changed files with 7 additions and 7 deletions
|
@ -16,7 +16,7 @@ describe('{{ghost_foot}} helper', function () {
|
|||
});
|
||||
|
||||
it('outputs global injected code', function () {
|
||||
settingsCacheStub.withArgs('ghost_foot').returns('<script>var test = \'I am a variable!\'</script>');
|
||||
settingsCacheStub.withArgs('codeinjection_foot').returns('<script>var test = \'I am a variable!\'</script>');
|
||||
|
||||
const rendered = helpers.ghost_foot({data: {}});
|
||||
should.exist(rendered);
|
||||
|
@ -24,7 +24,7 @@ describe('{{ghost_foot}} helper', function () {
|
|||
});
|
||||
|
||||
it('outputs post injected code', function () {
|
||||
settingsCacheStub.withArgs('ghost_foot').returns('<script>var test = \'I am a variable!\'</script>');
|
||||
settingsCacheStub.withArgs('codeinjection_foot').returns('<script>var test = \'I am a variable!\'</script>');
|
||||
|
||||
const rendered = helpers.ghost_foot({
|
||||
data: {
|
||||
|
@ -41,7 +41,7 @@ describe('{{ghost_foot}} helper', function () {
|
|||
});
|
||||
|
||||
it('handles post injected code being null', function () {
|
||||
settingsCacheStub.withArgs('ghost_foot').returns('<script>var test = \'I am a variable!\'</script>');
|
||||
settingsCacheStub.withArgs('codeinjection_foot').returns('<script>var test = \'I am a variable!\'</script>');
|
||||
|
||||
const rendered = helpers.ghost_foot({
|
||||
data: {
|
||||
|
@ -58,7 +58,7 @@ describe('{{ghost_foot}} helper', function () {
|
|||
});
|
||||
|
||||
it('handles post injected code being empty', function () {
|
||||
settingsCacheStub.withArgs('ghost_foot').returns('<script>var test = \'I am a variable!\'</script>');
|
||||
settingsCacheStub.withArgs('codeinjection_foot').returns('<script>var test = \'I am a variable!\'</script>');
|
||||
|
||||
const rendered = helpers.ghost_foot({
|
||||
data: {
|
||||
|
@ -75,7 +75,7 @@ describe('{{ghost_foot}} helper', function () {
|
|||
});
|
||||
|
||||
it('handles global empty code injection', function () {
|
||||
settingsCacheStub.withArgs('ghost_foot').returns('');
|
||||
settingsCacheStub.withArgs('codeinjection_foot').returns('');
|
||||
|
||||
const rendered = helpers.ghost_foot({data: {}});
|
||||
should.exist(rendered);
|
||||
|
@ -83,7 +83,7 @@ describe('{{ghost_foot}} helper', function () {
|
|||
});
|
||||
|
||||
it('handles global undefined code injection', function () {
|
||||
settingsCacheStub.withArgs('ghost_foot').returns(undefined);
|
||||
settingsCacheStub.withArgs('codeinjection_foot').returns(undefined);
|
||||
|
||||
const rendered = helpers.ghost_foot({data: {}});
|
||||
should.exist(rendered);
|
||||
|
|
|
@ -1411,7 +1411,7 @@ describe('{{ghost_head}} helper', function () {
|
|||
beforeEach(function () {
|
||||
sandbox = sinon.createSandbox();
|
||||
settingsCache.get.withArgs('icon').returns('/content/images/favicon.png');
|
||||
settingsCache.get.withArgs('ghost_head').returns('<style>body {background: red;}</style>');
|
||||
settingsCache.get.withArgs('codeinjection_head').returns('<style>body {background: red;}</style>');
|
||||
|
||||
testUrlUtils.stubUrlUtils({url: 'http://localhost:65530/'}, sandbox);
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue