mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-06 22:40:14 -05:00
Removed accidentally duplicated tests
- this was a result of a bad rebase, these tests should only exist once in their new form
This commit is contained in:
parent
0bdaa216e5
commit
4ba372d813
1 changed files with 0 additions and 37 deletions
|
@ -148,41 +148,4 @@ describe('Match helper', function () {
|
||||||
shouldCompileToExpected(templateString, {title}, expected);
|
shouldCompileToExpected(templateString, {title}, expected);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// By using match as a block helper, instead of returning true or false, the matching template is executed
|
|
||||||
// We've already tested all the logic of the matches, for the block helpers we only need to test that the correct template is executed
|
|
||||||
describe('{{#match}} (block)', function () {
|
|
||||||
it('Executes the first block when match is true', function () {
|
|
||||||
const templateString = '{{#match title "=" "Hello World"}}case a{{else match title "=" "Hello World!"}}case b{{else}}case c{{/match}}';
|
|
||||||
const hash = {
|
|
||||||
title: 'Hello World'
|
|
||||||
};
|
|
||||||
|
|
||||||
const expected = 'case a';
|
|
||||||
|
|
||||||
shouldCompileToExpected(templateString, hash, expected);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('Executes secondary blocks correctly', function () {
|
|
||||||
const templateString = '{{#match title "=" "Hello World"}}case a{{else match title "=" "Hello World!"}}case b{{else}}case c{{/match}}';
|
|
||||||
const hash = {
|
|
||||||
title: 'Hello World!'
|
|
||||||
};
|
|
||||||
|
|
||||||
const expected = 'case b';
|
|
||||||
|
|
||||||
shouldCompileToExpected(templateString, hash, expected);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('Executes the else block when match is false', function () {
|
|
||||||
const templateString = '{{#match title "=" "Hello World"}}case a{{else match title "=" "Hello World!"}}case b{{else}}case c{{/match}}';
|
|
||||||
const hash = {
|
|
||||||
title: 'Hello'
|
|
||||||
};
|
|
||||||
|
|
||||||
const expected = 'case c';
|
|
||||||
|
|
||||||
shouldCompileToExpected(templateString, hash, expected);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue